Skip to content

Commit

Permalink
test(ci): update CI to current versions, correct cache for yarn@4
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Feb 20, 2025
1 parent 1ae2b06 commit cab30e1
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,46 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: CI Test
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 14
- name: Configure JDK 1.11
uses: actions/setup-java@v2
node-version: 20
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: "11"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
name: Yarn Cache
distribution: "temurin"
java-version: "21"
- uses: actions/cache/restore@v4
name: Yarn Cache Restore
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
path: .yarn/cache
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-v1
- name: Yarn Install
uses: nick-invision/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 3
timeout_minutes: 15
retry_wait_seconds: 30
max_attempts: 3
command: yarn --no-audit --prefer-offline
command: yarn
- name: Lint
run: ./test.sh
- uses: actions/cache/save@v4
name: Yarn Cache Save
if: "${{ github.ref == 'refs/heads/main' }}"
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}

0 comments on commit cab30e1

Please sign in to comment.