From cab30e1f22bcd63ad02be90429080d9d229cda82 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 20 Feb 2025 15:36:36 -0500 Subject: [PATCH] test(ci): update CI to current versions, correct cache for yarn@4 --- .github/workflows/test.yml | 44 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29bbd61..4b9359f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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') }}