Skip to content

Commit

Permalink
ci: transfer node_modules as a single archive
Browse files Browse the repository at this point in the history
  • Loading branch information
cwillisf committed Dec 13, 2023
1 parent db8fab6 commit 714b85b
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 33 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ jobs:
env:
NODE_ENV: development
run: npm ci
- if: ${{ steps.filter.outputs.any-workspace == 'true' }}
run:
tar --zstd -cfv node_modules.tar.zst node_modules workspaces/*/node_modules
- if: ${{ steps.filter.outputs.any-workspace == 'true' }}
uses: actions/upload-artifact@v3
with:
name: node-modules
path: |
node_modules/
workspaces/*/node_modules/
path: node_modules.tar.zst
retention-days: 1
paper-js:
uses: ./.github/workflows/workspace-paper-js.yml
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-paper-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-audio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-blocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-paint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-sb1-converter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-svg-renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/workspace-scratch-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
path: .
- run: ls . workspaces/*/
- name: Install NPM dependencies
env:
NODE_ENV: development
working-directory: .
run: if [ ! -d node_modules ]; then npm ci; fi
run: |
if [ -f node_modules.tar.zst ]; then
tar --zstd -xvf node_modules.tar.zst
else
NODE_ENV=development npm ci
fi
- name: Build
run: npm run build
- name: Test
Expand Down

0 comments on commit 714b85b

Please sign in to comment.