Skip to content

Commit

Permalink
ci: update cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyshlyaev177 committed Sep 19, 2024
1 parent fe22f3a commit 70ef91f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 25 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
./node_modules
key: modules-1-${{ hashFiles('./package-lock.json','./package.json') }}
key: modules-1-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm clean-install && npx cross-env HOME=/root PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium firefox webkit
Expand All @@ -65,7 +63,7 @@ jobs:
with:
path: |
./node_modules
key: modules-1-${{ hashFiles('./package-lock.json','./package.json') }}
key: modules-1-${{ hashFiles('./package-lock.json') }}

build:
name: build
Expand All @@ -88,7 +86,7 @@ jobs:
with:
path: |
./node_modules
key: modules-1-${{ hashFiles('./package-lock.json','./package.json') }}
key: modules-1-${{ hashFiles('./package-lock.json') }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
Expand All @@ -111,7 +109,7 @@ jobs:
./packages/example-nextjs14/.next
./packages/example-nextjs15/package.json
./packages/example-nextjs15/.next
key: modules-2-${{ github.head_ref }}
key: modules-2-${{ github.sha }}

testint:
needs: [build]
Expand Down Expand Up @@ -141,7 +139,7 @@ jobs:
./packages/example-nextjs14/.next
./packages/example-nextjs15/package.json
./packages/example-nextjs15/.next
key: modules-2-${{ github.head_ref }}
key: modules-2-${{ github.sha }}

- name: Run Playwright tests
run: |
Expand Down Expand Up @@ -189,7 +187,7 @@ jobs:
./packages/example-nextjs14/.next
./packages/example-nextjs15/package.json
./packages/example-nextjs15/.next
key: modules-2-${{ github.head_ref }}
key: modules-2-${{ github.sha }}

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
Expand All @@ -212,3 +210,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

- name: clear cache
run: gh cache delete modules-2-${{ github.sha }} --confirm
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@
"dependencies": [
"build:next15"
],
"command": "npx next@rc start packages/example-nextjs15 --port 3001",
"command": "cd packages/example-next15 && npx next start packages/example-nextjs15 --port 3001",
"service": true
},
"start:demo15:ci": {
"command": "npx next@rc start packages/example-nextjs15 --port 3001",
"command": "cd packages/example-next15 && npx next start packages/example-nextjs15 --port 3001",
"service": true
},
"start": {
Expand Down
4 changes: 2 additions & 2 deletions packages/example-nextjs15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"babel-plugin-react-compiler": "^0.0.0-experimental-fe484b5-20240911",
"next": "^15.0.0-rc.0",
"react": "^19.0.0-rc-d6cb4e77-20240911",
"react-dom": "^19.0.0-rc-d6cb4e77-20240911"
"react": "^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0-rc-5dcb0097-20240918"
},
"devDependencies": {
"@types/node": "^20",
Expand Down

0 comments on commit 70ef91f

Please sign in to comment.