ci.yml 782 B

123456789101112131415161718192021222324252627282930313233
  1. name: ci
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - '**'
  9. jobs:
  10. test:
  11. strategy:
  12. matrix:
  13. node: [ '18', '20' ]
  14. name: Node ${{ matrix.node }}
  15. runs-on: ubuntu-latest
  16. timeout-minutes: 30
  17. env:
  18. COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
  19. COVERAGE_OPTION: ./node_modules/.bin/nyc
  20. steps:
  21. - uses: actions/checkout@v4
  22. - name: Use Node.js
  23. uses: actions/setup-node@v4
  24. with:
  25. node-version: ${{ matrix.node }}
  26. cache: 'npm'
  27. - name: Install dependencies
  28. run: npm ci
  29. - run: npm run coverage
  30. - run: bash <(curl -s https://codecov.io/bash)
  31. concurrency:
  32. group: ${{ github.workflow }}-${{ github.ref }}
  33. cancel-in-progress: true