Skip to content

Commit

Permalink
Merge pull request #1859 from epam/feat/fix_caching_in_qualityGate_wo…
Browse files Browse the repository at this point in the history
…rkflow_main

Fix cache in qualityGate workflow
  • Loading branch information
siarheiyelin authored Dec 18, 2023
2 parents 383d196 + 177c5ff commit 3020d24
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/qualityGate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ env:
jobs:
quality_gate:
runs-on: ubuntu-latest
container: node:20
steps:
# By default, it checks out the "merge-commit" for "pull_request" events (https://github.com/actions/checkout)
# I.e. the result of merging source branch to the target branch will be checked out.
- name: 'Checkout the "merge commit" branch'
uses: actions/checkout@v4
with:
path: ${{ env.MERGE_COMMIT_BRANCH_DIR }}
path: ${{ env.MERGE_COMMIT_BRANCH_DIR }}

# Checkout the TARGET branch.
- name: 'Checkout "target" branch'
Expand All @@ -45,13 +44,15 @@ jobs:
repository: ${{ github.event.pull_request.base.repo.full_name }}
path: ${{ env.TARGET_BRANCH_DIR }}

- uses: actions/cache@v3
- uses: actions/setup-node@v4
with:
path: |
node_modules
./*/node_modules
key: v1-npm-deps-${{ hashFiles('**/yarn.lock') }}
restore-keys: v1-npm-deps-
node-version: '20.x'
cache: 'yarn'
cache-dependency-path: |
${{ env.TARGET_BRANCH_DIR }}/yarn.lock
${{ env.TARGET_BRANCH_DIR }}/*/yarn.lock
${{ env.MERGE_COMMIT_BRANCH_DIR }}/yarn.lock
${{ env.MERGE_COMMIT_BRANCH_DIR }}/*/yarn.lock
- name: 'Install dependencies & Run "generate-components-api" (target branch)'
working-directory: ${{ env.TARGET_BRANCH_DIR }}
Expand Down

0 comments on commit 3020d24

Please sign in to comment.