Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache: move gha cache save to post state #280

Merged
merged 1 commit into from Mar 15, 2024

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Mar 15, 2024

follow-up #241

This moves github actions cache save handling in post step like it's currently done with official actions such as actions/setup-go.

@crazy-max crazy-max requested a review from nicks March 15, 2024 08:33
@crazy-max crazy-max force-pushed the post-cache branch 5 times, most recently from c026dab to 996c8de Compare March 15, 2024 09:09
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max marked this pull request as ready for review March 15, 2024 09:15
Copy link

@nicks nicks left a comment

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', () => {
Copy link

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?

Copy link
Member Author

@crazy-max crazy-max Mar 15, 2024

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.

@crazy-max crazy-max merged commit cd14c5b into docker:main Mar 15, 2024
28 checks passed
@crazy-max crazy-max deleted the post-cache branch March 15, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants