Skip to content

Commit 167dc0e

Browse files
committed
Add collab testing
1 parent 90db84e commit 167dc0e

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/collab.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Project on Google Collab (Execution)
2+
on: [pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest-4core
7+
container:
8+
image: docker://us-docker.pkg.dev/colab-images/public/runtime
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
ref: ${{ github.event.pull_request.head.sha }}
13+
- name: Check python version
14+
shell: bash -l {0}
15+
run: |
16+
python --version
17+
- name: Display Pip Versions
18+
shell: bash -l {0}
19+
run: pip list
20+
# - name: Download "build" folder (cache)
21+
# uses: dawidd6/action-download-artifact@v3
22+
# with:
23+
# workflow: cache.yml
24+
# branch: main
25+
# name: build-cache
26+
# path: _build
27+
# Install build software
28+
- name: Install Build Software
29+
shell: bash -l {0}
30+
run: |
31+
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.1 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0
32+
# Build of HTML (Execution Testing)
33+
- name: Build HTML
34+
shell: bash -l {0}
35+
run: |
36+
jb build lectures --path-output ./ -n -W --keep-going
37+
- name: Upload Execution Reports
38+
uses: actions/upload-artifact@v4
39+
if: failure()
40+
with:
41+
name: execution-reports
42+
path: _build/html/reports
43+
- name: Preview Deploy to Netlify
44+
uses: nwtgck/actions-netlify@v2
45+
with:
46+
publish-dir: '_build/html/'
47+
production-branch: main
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
deploy-message: "Preview Deploy from GitHub Actions"
50+
env:
51+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
52+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_S
53+
ITE_ID }}
54+
Footer

0 commit comments

Comments
 (0)