Skip to content

Commit

Permalink
ci(workflows): add node.js matrix to ci workflow
Browse files Browse the repository at this point in the history
- https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs

Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Nov 26, 2022
1 parent 484d837 commit 0f80b75
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# References:
#
# - https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
Expand Down Expand Up @@ -34,23 +35,32 @@ jobs:
github.event_name == 'workflow_dispatch' ||
!startsWith(github.event.head_commit.message, 'release:')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 19
- 18
- 16
- 14
steps:
- id: debug
name: Print environment variables and event payload
uses: hmarr/debug-action@v2.1.0
- id: checkout
name: Checkout ${{ env.REF }}
uses: actions/checkout@v3.1.0
with:
ref: ${{ env.REF }}
- id: node
name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.5.1
with:
cache: yarn
node-version: ${{ matrix.node-version }}
- id: debug
name: Print environment variables and event payload
uses: hmarr/debug-action@v2.1.0
- id: yarn
name: Install dependencies
if: github.actor != 'dependabot[bot]'
run: yarn
- id: yarn-dependabot
name: Install dependencies for dependabot
if: github.actor == 'dependabot[bot]'
run: yarn --no-immutable
run: yarn ${{ github.actor == 'dependabot[bot]' && '' || '--no-immutable' }}
- id: format
name: Check code formatting
run: yarn check:format
Expand Down

0 comments on commit 0f80b75

Please sign in to comment.