diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8218882 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + 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 }} + cache: 'npm' + + - run: npm ci + + - name: Run Tests + run: npm run test:ci + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: jest-test-results-${{ matrix.node-version }} + path: test-results/junit.xml