Skip to content

Commit

Permalink
[actions] add tests on windows and Mac OS
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 22, 2021
1 parent 1e230d1 commit 6c3d87d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/node-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Tests: node.js (mac/windows)'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
majors: ${{ steps.set-matrix.outputs.requireds }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
type: 'majors'
preset: '>=4'

majors:
needs: [matrix]
name: 'latest majors'
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.majors) }}
os:
- windows-latest
- macos-latest

steps:
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@windows
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run tests-only
- uses: codecov/codecov-action@v3

node:
name: 'node - mac/windows'
needs: [majors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

0 comments on commit 6c3d87d

Please sign in to comment.