name: CI on: push: branches: [master] pull_request: paths: - "**.js" - "package.json" - ".github/workflows/ci.yml" jobs: test: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] node: ["16", "15", "14", engines] exclude: # On Windows, run tests with only the LTS environments. - os: windows-latest node: engines - os: windows-latest node: "14" # On macOS, run tests with only the LTS environments. - os: macOS-latest node: engines - os: macOS-latest node: "14" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Get Node.JS version from package.json if: matrix.node == 'engines' id: get-version run: echo ::set-output name=node::$(npx --q minimum-node-version) - uses: actions/setup-node@v2-beta if: matrix.node != 'engines' with: node-version: ${{ matrix.node }} - uses: actions/setup-node@v2-beta if: matrix.node == 'engines' with: node-version: ${{steps.get-version.outputs.node}} - run: npm install - run: npm run report -- --colors - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: file: ./coverage/coverage-final.json