Skip to content

Commit cab30e1

Browse files
committed
test(ci): update CI to current versions, correct cache for yarn@4
1 parent 1ae2b06 commit cab30e1

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

.github/workflows/test.yml

+24-20
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,46 @@ on:
88
branches:
99
- main
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
test:
1317
name: CI Test
1418
timeout-minutes: 15
1519
runs-on: ubuntu-latest
1620
steps:
17-
- uses: styfle/[email protected]
18-
with:
19-
all_but_latest: true
20-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2122
with:
2223
fetch-depth: 1
23-
- uses: actions/setup-node@v2
24+
- uses: actions/setup-node@v4
2425
with:
25-
node-version: 14
26-
- name: Configure JDK 1.11
27-
uses: actions/setup-java@v2
26+
node-version: 20
27+
- name: Configure JDK
28+
uses: actions/setup-java@v4
2829
with:
29-
distribution: "adopt"
30-
java-version: "11"
31-
- name: Get yarn cache directory path
32-
id: yarn-cache-dir-path
33-
run: echo "::set-output name=dir::$(yarn cache dir)"
34-
- uses: actions/cache@v2
35-
name: Yarn Cache
30+
distribution: "temurin"
31+
java-version: "21"
32+
- uses: actions/cache/restore@v4
33+
name: Yarn Cache Restore
3634
id: yarn-cache
3735
with:
38-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39-
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
36+
path: .yarn/cache
37+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
4038
restore-keys: ${{ runner.os }}-yarn-v1
4139
- name: Yarn Install
42-
uses: nick-invision/retry@v2
40+
uses: nick-fields/retry@v3
4341
with:
44-
timeout_minutes: 3
42+
timeout_minutes: 15
4543
retry_wait_seconds: 30
4644
max_attempts: 3
47-
command: yarn --no-audit --prefer-offline
45+
command: yarn
4846
- name: Lint
4947
run: ./test.sh
48+
- uses: actions/cache/save@v4
49+
name: Yarn Cache Save
50+
if: "${{ github.ref == 'refs/heads/main' }}"
51+
with:
52+
path: .yarn/cache
53+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}

0 commit comments

Comments
 (0)