diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2d3275b..4ffe5aa 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,32 +1,24 @@ name: Node.js CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - +on: [push, pull_request] jobs: - build: + run: runs-on: ubuntu-latest - strategy: matrix: - node-version: [16.x, 18.x] - + node-version: [18.x, 20.x] steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - - name: Install dependencies - run: yarn install - - - name: Run tests - run: yarn test:cov - - - name: Upload coverage to Codecov - run: yarn coverage + - name: Checkout + uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - name: Install dependencies + run: yarn install + - name: Run tests and collect coverage + run: yarn test:cov + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}