From eb52f3788fe821427863ebe52fb6935ea7ec2474 Mon Sep 17 00:00:00 2001 From: Arthur <82575487+arthur-mountain@users.noreply.github.com> Date: Wed, 7 Aug 2024 02:43:10 +0800 Subject: [PATCH] [CI] fix the shared_lint cached key (#30609) ## Summary In the shared_lint, for the first Prettier job, use `${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}` as the cache key. For the following jobs, use `${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}` as the cache key. Some of the jobs do not hit the cache if the hash does not match. ## How did you test this change? I run [act](https://github.com/nektos/act) locally to test it. --- .github/workflows/shared_lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/shared_lint.yml b/.github/workflows/shared_lint.yml index 668aa3e6f6..31834c3fb9 100644 --- a/.github/workflows/shared_lint.yml +++ b/.github/workflows/shared_lint.yml @@ -43,7 +43,7 @@ jobs: uses: actions/cache@v4 with: path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - run: yarn install --frozen-lockfile - run: node ./scripts/tasks/eslint @@ -61,7 +61,7 @@ jobs: uses: actions/cache@v4 with: path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - run: yarn install --frozen-lockfile - run: ./scripts/ci/check_license.sh @@ -79,6 +79,6 @@ jobs: uses: actions/cache@v4 with: path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - run: yarn install --frozen-lockfile - run: ./scripts/ci/test_print_warnings.sh