chore: switch to actions/cache (#13308)
This commit is contained in:
parent
c00a5b14c2
commit
84aea50e06
1 changed files with 60 additions and 10 deletions
70
.github/workflows/default.yml
vendored
70
.github/workflows/default.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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"
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue