name: Node.js CI on: push: branches: [ master ] pull_request: branches: [ master ] defaults: run: shell: bash working-directory: ts jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: node-version: [14.x, 16.x, 18.x, 20.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run test-cov - name: Require 90% diff coverage if: github.event_name == 'pull_request' run: | git fetch --no-tags --depth=1 origin ${{ github.event.pull_request.base.sha }} python3 "${{ github.workspace }}/.github/scripts/require_diff_coverage.py" \ --base "${{ github.event.pull_request.base.sha }}" \ --source-root ts \ --report coverage/lcov.info \ --format lcov \ --minimum 90 - uses: codecov/codecov-action@v4 with: flags: typescript # optional token: ${{ secrets.CODECOV_TOKEN }}