name: Node.js CI on: workflow_dispatch: # push: pull_request: jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [16.x, 18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Install dependancies run: npm install - name: Run tests run: npm test - name: Archive test results to GitHub Packages uses: actions/upload-artifact@v3 with: name: ${{ github.ref_name }}-${{ github.run_id }}-${{ matrix.node-version }}-test-results path: ./out/test-results.xml