From 0f086b006ee7943011c10b4119397fc6ea5dcccc Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Mon, 13 Jan 2025 22:53:49 +0100 Subject: [PATCH] [CI] Drop explicit Yarn dependencies caching steps for actions/setup-node --- .github/workflows/test.yaml | 39 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 24dd1d62c4..c60372b188 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,16 +17,9 @@ jobs: steps: - uses: actions/checkout@v4 - run: corepack enable - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - id: yarn-cache + - uses: actions/setup-node@v4 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: 'yarn' - run: yarn --immutable - run: yarn ci @@ -36,16 +29,12 @@ jobs: steps: - uses: actions/checkout@v4 - run: corepack enable - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - id: yarn-cache + - uses: actions/setup-node@v4 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: 'yarn' + cache-dependency-path: | + yarn.lock + **/package.json - run: yarn --immutable && yarn build - name: Check if js dist files are current id: changes @@ -134,16 +123,12 @@ jobs: steps: - uses: actions/checkout@v4 - run: corepack enable - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - id: yarn-cache + - uses: actions/setup-node@v4 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: 'yarn' + cache-dependency-path: | + yarn.lock + **/package.json - run: yarn --immutable - run: yarn playwright install - run: yarn test