Skip to content

Commit

Permalink
build: parallelize build
Browse files Browse the repository at this point in the history
  • Loading branch information
stuft2 committed Jul 26, 2024
1 parent 95b3715 commit 50a4e21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node_index: [0, 1]
total_nodes: [2]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -34,11 +36,10 @@ jobs:
run: npm install

- name: npm test
run: npm run test

- name: npm test with coverage
if: ${{ matrix.node-version == env.node_version }} # just run coverage if node 16
run: npm run coverage
env:
CI_NODE_INDEX: ${{ matrix.node_index }}
CI_NODE_TOTAL: ${{ matrix.total_nodes }}

- name: Upload coverage to Codecov
if: ${{ matrix.node-version == env.node_version }} # just run coverage if node 16
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
test:
name: Test Module
runs-on: ubuntu-latest
strategy:
matrix:
node_index: [0, 1]
total_nodes: [2]
fail-fast: false
steps:
- uses: actions/checkout@v4

Expand All @@ -52,8 +57,10 @@ jobs:
run: npm install

- name: npm test
run: |
npm run coverage
run: npm run coverage
env:
CI_NODE_INDEX: ${{ matrix.node_index }}
CI_NODE_TOTAL: ${{ matrix.total_nodes }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down

0 comments on commit 50a4e21

Please # to comment.