bump coverage on bin by removing an existing file first #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Node.js CI | |
| on: | |
| push: | |
| paths: | |
| - index.js | |
| - lib/*.js | |
| - bin-lib/*.js | |
| - tests/**/*.mjs | |
| - package.json | |
| - package-lock.json | |
| - .github/workflows/*.yml | |
| - .c8rc.coveralls.json | |
| - bin/docdown.js | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - index.js | |
| - lib/*.js | |
| - bin-lib/*.js | |
| - tests/**/*.mjs | |
| - package.json | |
| - package-lock.json | |
| jobs: | |
| fail-early: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node_version: | |
| - 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node_version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: make docs | |
| basic-checks: | |
| runs-on: ubuntu-latest | |
| needs: fail-early | |
| strategy: | |
| matrix: | |
| node_version: | |
| - 6 | |
| - 7 | |
| - 8 | |
| - 9 | |
| - 11 | |
| - 21 | |
| - 24 | |
| - 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node_version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| cache: 'npm' | |
| - name: install clean | |
| if: ${{ matrix.node_version > 9 }} | |
| run: npm ci | |
| - name: install dirty | |
| if: ${{ matrix.node_version <= 9 }} | |
| run: npm install | |
| - run: make docs | |
| coverage--node: | |
| name: Node Coverage | |
| runs-on: ubuntu-latest | |
| needs: fail-early | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 21 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 21 | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm install -g c8@10 | |
| - run: c8 -c ./.c8rc.coveralls.json -o ./coverage/from-usage/ make coverage--bin | |
| - run: c8 -c ./.c8rc.coveralls.json -o ./coverage/from-tests/ node --test './tests/**/*.spec.mjs' | |
| - run: cp -r ./coverage/*/tmp/*.json ./coverage/tmp | |
| - run: c8 -c ./.c8rc.coveralls.json report | |
| - name: Coveralls GitHub Action | |
| uses: coverallsapp/github-action@v2.2.3 | |
| with: | |
| file: './coverage/lcov.info' |