|
8 | 8 | branches:
|
9 | 9 | - main
|
10 | 10 |
|
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
11 | 15 | jobs:
|
12 | 16 | test:
|
13 | 17 | name: CI Test
|
14 | 18 | timeout-minutes: 15
|
15 | 19 | runs-on: ubuntu-latest
|
16 | 20 | steps:
|
17 |
| - |
18 |
| - with: |
19 |
| - all_but_latest: true |
20 |
| - - uses: actions/checkout@v2 |
| 21 | + - uses: actions/checkout@v4 |
21 | 22 | with:
|
22 | 23 | fetch-depth: 1
|
23 |
| - - uses: actions/setup-node@v2 |
| 24 | + - uses: actions/setup-node@v4 |
24 | 25 | 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 |
28 | 29 | 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 |
36 | 34 | id: yarn-cache
|
37 | 35 | 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') }} |
40 | 38 | restore-keys: ${{ runner.os }}-yarn-v1
|
41 | 39 | - name: Yarn Install
|
42 |
| - uses: nick-invision/retry@v2 |
| 40 | + uses: nick-fields/retry@v3 |
43 | 41 | with:
|
44 |
| - timeout_minutes: 3 |
| 42 | + timeout_minutes: 15 |
45 | 43 | retry_wait_seconds: 30
|
46 | 44 | max_attempts: 3
|
47 |
| - command: yarn --no-audit --prefer-offline |
| 45 | + command: yarn |
48 | 46 | - name: Lint
|
49 | 47 | 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