cache: move gha cache save to post state by crazy-max · Pull Request #280 · docker/actions-toolkit (original) (raw)

nicks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

const fixturesDir = path.join(__dirname, 'fixtures');
describe('cache', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for my own education - what does itg in the filename cache.test.itg.ts stand for?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is using a dedicated jest config for integration tests

testMatch: ['**/*.test.itg.ts'],

this way we can run each them on dedicated runners on ci:

test-itg:
runs-on: ${{ matrix.os }}
needs:
- prepare-itg
strategy:
fail-fast: false
matrix:
test: ${{ fromJson(needs.prepare-itg.outputs.matrix) }}
os:
- ubuntu-latest
#- macos-13 # https://github.com/docker/actions-toolkit/issues/279
- macos-latest
- windows-latest

https://github.com/docker/actions-toolkit/blob/main/jest.config.ts is for unit tests only.