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

chore: switch to actions/cache #13308

Merged
merged 7 commits into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 60 additions & 10 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ jobs:
steps:
- uses: actions/checkout@v4

# - uses: actions/setup-go@v5
- uses: erezrokah/setup-go@feat/add_cache_prefix
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-key-prefix: clean-cache-
cache: false
id: go

- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-clean-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-clean-
${{ runner.os }}-go-

- name: Install tools
run: make install

Expand All @@ -47,12 +56,22 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: erezrokah/setup-go@feat/add_cache_prefix
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-key-prefix: build-cache-
cache: false
id: go

- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-
${{ runner.os }}-go-

- uses: actions/setup-node@v4
with:
node-version: "18"
Expand All @@ -70,13 +89,22 @@ jobs:
steps:
- uses: actions/checkout@v4

# - uses: actions/setup-go@v5
- uses: erezrokah/setup-go@feat/add_cache_prefix
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-key-prefix: test-cache-
cache: false
id: go

- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-test-
${{ runner.os }}-go-

- name: Test
run: mkdir dist && touch dist/empty && make test

Expand Down Expand Up @@ -143,12 +171,22 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: erezrokah/setup-go@feat/add_cache_prefix
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-key-prefix: integration-cache-
cache: false
id: go

- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-integration-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-integration-
${{ runner.os }}-go-

- uses: actions/setup-node@v4
with:
node-version: "18"
Expand All @@ -160,12 +198,24 @@ jobs:
- name: Build Go
run: make build

- uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}

- name: Install playwright
run: npx playwright install --with-deps chromium

- name: Run tests
run: npx playwright test

# - name: Run tests
# uses: docker://mcr.microsoft.com/playwright:v1.34.3-jammy
# with:
# args: npx playwright test

- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down