Skip to content

Commit

Permalink
Remove caching and simplify workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Oct 3, 2024
1 parent fd801b7 commit d45e06d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Remove version from package-lock.json
run: jq 'del(.version, .packages[""].version)' package-lock.json > normalized-package-lock.json

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: normalized-package-lock.json

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}

- name: Run npm install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Remove version from package-lock.json
run: jq 'del(.version, .packages[""].version)' package-lock.json > normalized-package-lock.json

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: normalized-package-lock.json

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}

- name: Run npm install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
Expand All @@ -42,16 +30,5 @@ jobs:
max_attempts: 3
command: npm ci

- name: Get number of CPU cores
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@31e91de0f8654375a21e8e83078be625380e2b18

- name: Cache Jest cache
id: cache-jest-cache
uses: actions/cache@v4
with:
path: .jest-cache
key: ${{ runner.os }}-jest

- name: Run Jest tests
run: NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" npx jest --silent --max-workers ${{ steps.cpu-cores.outputs.count }}
run: npm run test

0 comments on commit d45e06d

Please sign in to comment.