11name : CI
22
33on :
4- schedule :
5- - cron : ' 45 01 30 * *'
64 push :
7- fork :
5+ pull_request :
6+ workflow_dispatch :
87
98jobs :
10- test_links_utils :
11- name : Check links in ipynb
12- runs-on : ubuntu-latest
13- timeout-minutes : 5
14- steps :
15- - name : checkout
16- id : checkout
17- uses : actions/checkout@v4
18-
19- - name : setup environment
20- id : setup
21- run : python -m pip install pytest pytest-xdist requests jupyter lxml numpy matplotlib scipy sympy
22-
23- - name : check links
24- id : links
25- run : python -m pytest -n auto ./tests/test_check_links_in_ipynb.py ./utils/tests/
26-
279 badges :
2810 name : Add Google Colab Badges
29- needs : test_links_utils
3011 runs-on : ubuntu-latest
3112 permissions :
3213 contents : write
3314 timeout-minutes : 5
3415 steps :
35- - name : checkout
36- id : checkout
16+ - name : Checkout
3717 uses : actions/checkout@v4
3818
39- - name : Update pip
40- run : python -m pip install --upgrade pip
19+ - name : Set up Python
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : ' 3.x'
4123
42- - name : setup environment
43- id : setup
44- run : python -m pip install bs4 jupyter lxml
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ python -m pip install bs4 jupyter lxml
4528
4629 - name : Add/Update badges
47- id : badges
4830 run : python ./utils/add_colab_main_buttons.py
4931
5032 - name : Commit & push
51- id : commit
5233 uses : stefanzweifel/git-auto-commit-action@v5
5334 with :
54- commit_message : " Clean ipynb ${{ github.sha }} "
35+ commit_message : " Add Google Colab badges "
5536
5637 test_ipynb :
5738 needs : badges
58- name : ${{ matrix.anaconda }} on ${{ matrix.os }}
59- runs-on : ${{ matrix.os }}
39+ name : Test ipynb with Anaconda ${{ matrix.anaconda }}
40+ runs-on : ubuntu-latest
6041 strategy :
6142 matrix :
62- os : [ubuntu-latest]
63- anaconda : ["2021.11", nightly]
43+ anaconda : ["2021.11", "nightly"]
6444 fail-fast : false
6545 timeout-minutes : 30
6646 steps :
67- - uses : actions/checkout@v4
47+ - name : Checkout
48+ uses : actions/checkout@v4
6849
69- - name : build environment
70- env :
71- CONDA_PYTHON : ${{ matrix.anaconda }}
72- run : bash ./.github/workflows/build_env.sh
50+ - name : Set up Miniconda
51+ uses : conda-incubator/setup-miniconda@v3
52+ with :
53+ auto-update-conda : true
54+ miniconda-version : " latest"
55+ environment-file : ./tests/environment.${{ matrix.anaconda }}.yml
56+ activate-environment : test-environment
7357
74- - name : pytest
58+ - name : Run tests
59+ shell : bash -l {0}
7560 env :
7661 TEST_IPYNB_IGNORE_FOLDER : tutorial
77- run : bash ./.github/workflows/run_test.sh
62+ run : |
63+ pytest --numprocesses=auto -k 'not (links or update_nmisp_py)' tests/
0 commit comments