diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 471408ae7..43700efca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,10 +6,11 @@ on: name: ci jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: node: [10, 12, 14] + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2 - run: git fetch --prune --unshallow @@ -21,15 +22,19 @@ jobs: - run: node --version - run: npm install --engine-strict - run: npm test - windows: - runs-on: windows-latest + - run: npm run coverage + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: ${{matrix.os}}-node-${{ matrix.node }} + parallel: true + finish: + needs: test + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: git fetch --prune --unshallow - - run: git config --global user.name 'Actions' - - run: git config --global user.email 'dummy@example.org' - - uses: actions/setup-node@v2 + - name: Coveralls + uses: coverallsapp/github-action@master with: - node-version: 12 - - run: npm install - - run: npm test + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true \ No newline at end of file diff --git a/package.json b/package.json index b28260895..d767fd021 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "posttest": "eslint .", "test": "nyc mocha --timeout=30000", "test:unit": "mocha --exclude test/git.spec.js", + "coverage": "nyc report --reporter=text-lcov | coveralls", "release": "bin/cli.js" }, "nyc": { @@ -60,10 +61,10 @@ "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "mocha": "^8.0.0", - "mock-fs": "^4.12.0", + "mocha": "^8.2.1", + "mock-fs": "^4.13.0", "mockery": "^2.1.0", - "nyc": "^14.1.1", + "nyc": "^15.1.0", "shelljs": "^0.8.4", "std-mocks": "^1.0.1" }