2121 - cron : ' 0 0 * * *'
2222
2323jobs :
24+ # TODO: Fix the required checks!
25+ # When the pre_job triggers and skips builds, it prevents merging the PR because
26+ # the required checks are reported as skipped instead of passed.
2427 # Special job which automatically cancels old runs for the same branch, prevents runs for the
2528 # same file set which has already passed, etc.
2629 pre_job :
4043 needs : pre_job
4144 # NOTE: We always want to run job on master since we run some additional checks there (code
4245 # coverage, etc)
43- if : ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
46+ # if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
4447 name : ' ${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
4548 runs-on : ubuntu-latest
4649 strategy :
9295 # TODO: maybe make the virtualenv a partial cache to exclude st2*?
9396 # !virtualenv/lib/python*/site-packages/st2*
9497 # !virtualenv/bin/st2*
95- key : ${{ runner.os }}-v2-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
96- restore-keys : |
97- ${{ runner.os }}-v2-python-${{ matrix.python }}-
98+ key : ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
99+ # Don't use alternative key as if requirements.txt has altered we
100+ # don't want to retrieve previous cache
101+ # restore-keys: |
102+ # ${{ runner.os }}-v4-python-${{ matrix.python }}-
98103 - name : Cache APT Dependencies
99104 id : cache-apt-deps
100105 uses : actions/cache@v2
@@ -135,7 +140,8 @@ jobs:
135140 needs : pre_job
136141 # NOTE: We always want to run job on master since we run some additional checks there (code
137142 # coverage, etc)
138- if : ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
143+ # NB: disabled. See TODO above pre_job
144+ # if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
139145 name : ' ${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
140146 runs-on : ubuntu-latest
141147 strategy :
@@ -233,9 +239,11 @@ jobs:
233239 # TODO: maybe make the virtualenv a partial cache to exclude st2*?
234240 # !virtualenv/lib/python*/site-packages/st2*
235241 # !virtualenv/bin/st2*
236- key : ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
237- restore-keys : |
238- ${{ runner.os }}-python-${{ matrix.python }}-
242+ key : ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
243+ # Don't use alternative key as if requirements.txt has altered we
244+ # don't want to retrieve previous cache
245+ # restore-keys: |
246+ # ${{ runner.os }}-v4-python-${{ matrix.python }}-
239247 - name : Cache APT Dependencies
240248 id : cache-apt-deps
241249 uses : actions/cache@v2
@@ -304,7 +312,7 @@ jobs:
304312 needs : pre_job
305313 # NOTE: We always want to run job on master since we run some additional checks there (code
306314 # coverage, etc)
307- if : ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
315+ # if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
308316 name : ' ${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
309317 runs-on : ubuntu-latest
310318 strategy :
@@ -428,6 +436,7 @@ jobs:
428436
429437 # GitHub is juggling how to set vars for multiple shells. Protect our PATH assumptions.
430438 PATH : /home/runner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
439+
431440 steps :
432441 - name : Checkout repository
433442 uses : actions/checkout@v2
@@ -448,9 +457,11 @@ jobs:
448457 # TODO: maybe make the virtualenv a partial cache to exclude st2*?
449458 # !virtualenv/lib/python*/site-packages/st2*
450459 # !virtualenv/bin/st2*
451- key : ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
452- restore-keys : |
453- ${{ runner.os }}-python-${{ matrix.python }}-
460+ key : ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
461+ # Don't use alternative key as if requirements.txt has altered we
462+ # don't want to retrieve previous cache
463+ # restore-keys: |
464+ # ${{ runner.os }}-v4-python-${{ matrix.python }}-
454465 - name : Cache APT Dependencies
455466 id : cache-apt-deps
456467 uses : actions/cache@v2
0 commit comments