2929 # https://github.com/orgs/community/discussions/57827
3030 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
3131
32+ defaults :
33+ run :
34+ shell : bash -el {0}
35+
3236 strategy :
3337 matrix :
3438 include :
@@ -48,12 +52,12 @@ jobs:
4852 activate-environment : my-env
4953
5054 - name : Set cache date
51- run : echo "DATE=$(date +'%Y%m%d ')" >> $GITHUB_ENV
55+ run : echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
5256
5357 - name : Use env cache
5458 uses : actions/cache@v4
5559 with :
56- path : ${{ matrix.prefix }}
60+ path : ${{ env.CONDA }}/envs
5761 key : ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
5862 id : cache
5963
6569 run : make -C qstack/regression/lib/
6670
6771 - name : Run tests
68- shell : bash -l {0}
69- run : $CONDA_PREFIX/bin/pytest ./tests
72+ run : pytest ./tests
7073
7174
7275 # maybe split back into two workflows depending on each other
@@ -98,20 +101,20 @@ jobs:
98101 activate-environment : my-env
99102
100103 - name : Set cache date
101- run : echo "DATE=$(date +'%Y%m%d ')" >> $GITHUB_ENV
104+ run : echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
102105
103106 - name : Restore doc env cache
104107 uses : actions/cache@v4
105108 with :
106- path : ${{ matrix.prefix }}
109+ path : ${{ env.CONDA }}/envs
107110 key : ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ hashFiles('docs/requirements.txt') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
108111 id : cache-doc
109112
110113 - name : Restore env cache
111114 if : steps.cache-doc.outputs.cache-hit != 'true'
112115 uses : actions/cache/restore@v4
113116 with :
114- path : ${{ matrix.prefix }}
117+ path : ${{ env.CONDA }}/envs
115118 key : ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
116119 fail-on-cache-miss : true
117120 id : cache
0 commit comments