test.yaml 609 B

1234567891011121314151617181920212223242526
  1. name: test
  2. on:
  3. pull_request:
  4. jobs:
  5. test:
  6. strategy:
  7. matrix:
  8. node-version: ['16', '18', '20']
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v4
  12. - uses: actions/setup-node@v4
  13. with:
  14. node-version: ${{ matrix.node-version }}
  15. cache: npm
  16. - run: npm ci
  17. - run: npm i -D @vitest/coverage-v8@^2.1.6
  18. - run: npm run lint
  19. - run: npm test -- --coverage
  20. - uses: actions/upload-artifact@v3
  21. with:
  22. name: vitest-results-${{ matrix.node-version }}
  23. path: coverage/*
  24. if: ${{ always() }}