@@ -20,27 +20,28 @@ jobs:
2020 - qutip-version : ' 5'
2121 qutip-branch : ' master'
2222 steps :
23- - uses : actions/checkout@v3
23+ - uses : actions/checkout@v4
2424 - uses : gaurav-nelson/github-action-markdown-link-check@v1
2525 with :
2626 use-quiet-mode : ' yes'
2727 folder-path : tutorials-v${{ matrix.qutip-version }}
28+ # use config file to define 403 and 405 errors as valid links
29+ # (APS blocks this link check)
30+ config-file : mlc_config.json
2831
29- - name : Setup Mambaforge
30- uses : conda-incubator/setup-miniconda@v2
32+ - name : Setup Conda
33+ uses : conda-incubator/setup-miniconda@v3
3134 with :
32- miniforge-variant : Mambaforge
3335 miniforge-version : latest
34- activate-environment : test-environment
35- use-mamba : true
36+ activate-environment : test-environment-v${{ matrix.qutip-version }}
3637
3738 - name : Get Date
3839 id : get-date
3940 run : echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
4041 shell : bash
4142
4243 - name : Cache Conda env
43- uses : actions/cache@v2
44+ uses : actions/cache@v3
4445 with :
4546 path : ${{ env.CONDA }}/envs
4647 key : conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('test_environment.yml') }}-${{ env.CACHE_NUMBER }}-qutip-${{ matrix.qutip-version }}
5152
5253 - name : Install environment
5354 if : steps.cache.outputs.cache-hit != 'true'
54- run : mamba env update -n test-environment - f test_environment.yml
55+ run : conda env update -n test-environment-v${{ matrix.qutip-version }} - f test_environment-v${{ matrix.qutip-version }} .yml
5556
5657 - name : Install QuTiP
5758 run : |
@@ -104,3 +105,20 @@ jobs:
104105 path : |
105106 notebooks/*.ipynb
106107 notebooks/**/*.ipynb
108+
109+
110+ finalise :
111+ needs : pytests
112+ if : failure()
113+ runs-on : ubuntu-latest
114+ steps :
115+ - uses : actions/checkout@v4
116+ - name : Open Issue on Failure
117+ env :
118+ GITHUB_TOKEN : ${{ github.token }}
119+ run : |
120+ if [[ -z "${{ inputs.open_issue }}" ]] || [[ "${{ inputs.open_issue }}" != "False" ]];
121+ then
122+ pip install requests
123+ python tools/report_failing_tests.py $GITHUB_TOKEN
124+ fi
0 commit comments