name: Dev on: push: branches: - master - "patch-release" pull_request: jobs: test: strategy: fail-fast: false matrix: os: - "ubuntu-latest" - "macos-latest" - "windows-latest" node: - "13" - "12" - "10" include: # only enable coverage on the fastest job - os: "ubuntu-latest" node: "12" ENABLE_CODE_COVERAGE: true exclude: - os: "macos-latest" node: "13" env: ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }} name: Node.js ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 1 - name: Setup Node.js uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} - name: Install Dependencies run: yarn install --frozen-lockfile - name: Run Tests (macOS) if: matrix.os == 'macos-latest' run: yarn test --maxWorkers=4 - name: Run Tests (Linux and Windows) if: matrix.os != 'macos-latest' run: yarn test --maxWorkers=2 - name: Upload Coverage uses: codecov/codecov-action@v1 if: matrix.ENABLE_CODE_COVERAGE with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage/lcov.info fail_ci_if_error: true