Skip to content

Commit

Permalink
fix: move files to build cache after files are uploaded instead of co…
Browse files Browse the repository at this point in the history
…pying them before uploads (#753)

* fix: move files to cache after upload instead of copying them before

* chore: edit demo site a bit to ensure caching changes continue to work

* chore: add heavy files for testing purposes

* fix: skip storing build cache when cli is used

* revert: remove debug changes

* chore: drop debug console logs

* fix: also move when restoring cache

* test: use older node (for gatsby v3)

* fix: restoreCache types

* fix: ensure all build step hooks have typed arguments

* test: relax content-type check a bit

* test: pin netlify-cli

* test: use latest v5, log output on failure

* chore: upgrade @netlify/build
  • Loading branch information
pieh authored Jan 20, 2025
1 parent ca9a478 commit cd5bbd6
Show file tree
Hide file tree
Showing 13 changed files with 4,397 additions and 2,682 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '*'
node-version: '18'
- name: Global Node packages cache
uses: actions/cache@v3
with:
Expand All @@ -29,7 +29,7 @@ jobs:
key:
ubuntu-build-${{ env.cache-name }}-${{
hashFiles('plugin/test/fixtures/**/package.json') }}-node-modules
- run: npm install -g netlify-cli
- run: npm install -g netlify-cli@18.0.0
- run: npm ci
- run: cd plugin && npm ci && npm run build
- run: npm test
Expand All @@ -56,7 +56,7 @@ jobs:
key:
macOS-build-${{ env.cache-name }}-${{
hashFiles('plugin/test/fixtures/**/package.json') }}-node-modules
- run: npm install -g netlify-cli
- run: npm install -g netlify-cli@18.0.0
- run: npm ci
- run: cd plugin && npm ci && npm run build
- run: npm test
2 changes: 1 addition & 1 deletion demo-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@sindresorhus/slugify": "^1.1.2",
"gatsby": "next",
"gatsby": "5.11.0",
"gatsby-plugin-image": "next",
"gatsby-plugin-sharp": "next",
"gatsby-source-filesystem": "next",
Expand Down
2,436 changes: 1,801 additions & 635 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"prettier": "--loglevel=warn \"{plugin,demo,.github}/**/*.{ts,js,md,yml,json,html}\" \"*.{ts,js,yml,json,html}\" \".*.{ts,js,yml,json,html}\" \"!package-lock.json\""
},
"devDependencies": {
"@netlify/build": "^29.36.1",
"@netlify/build": "^29.58.7",
"@netlify/eslint-config-node": "7.0.1",
"@types/jest": "^29.0.0",
"ava": "^5.0.0",
Expand Down
Loading

0 comments on commit cd5bbd6

Please sign in to comment.