Skip to content

Commit

Permalink
chore: include patch packages in cache-key (#2855)
Browse files Browse the repository at this point in the history
Related to https://dhis2.atlassian.net/browse/LIBS-383

Add package patches to the yarn cache key.

If a new patch is added, then this ensures that that the yarn cache
gets invalidated and forces yarn install, which will then do the
postinstall step that applies the patches.

From user perspective, the e2e-prod tests might fail if it is depending
on a patch that didn't get installed.

Co-authored-by: Jan Henrik Øverland <[email protected]>
  • Loading branch information
jenniferarnesen and janhenrikoverland committed Mar 19, 2024
1 parent 2322a42 commit d114ca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('patches/*.patch') }}

- name: End-to-End tests
uses: cypress-io/github-action@v2
Expand All @@ -104,7 +104,7 @@ jobs:
start: ${{ env.SERVER_START_CMD }}
wait-on: ${{ env.SERVER_URL }}
wait-on-timeout: 300
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('patches/*.patch') }}
group: 'e2e'
tag: ${{ github.event_name }}
env:
Expand Down

0 comments on commit d114ca6

Please sign in to comment.