ci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: CI
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - master
  7. - next
  8. - 'v*'
  9. paths-ignore:
  10. - 'docs/**'
  11. - '*.md'
  12. pull_request:
  13. paths-ignore:
  14. - 'docs/**'
  15. - '*.md'
  16. jobs:
  17. test-regression-check-node10:
  18. name: Test compatibility with Node.js 10
  19. runs-on: ubuntu-latest
  20. steps:
  21. - uses: actions/checkout@v4
  22. with:
  23. persist-credentials: false
  24. - uses: actions/setup-node@v4
  25. with:
  26. node-version: '10'
  27. cache: 'npm'
  28. cache-dependency-path: package.json
  29. check-latest: true
  30. - name: Install
  31. run: |
  32. npm install --ignore-scripts
  33. - name: Copy project as fast-uri to node_node_modules
  34. run: |
  35. rm -rf ./node_modules/fast-uri/lib &&
  36. rm -rf ./node_modules/fast-uri/index.js &&
  37. cp -r ./lib ./node_modules/fast-uri/lib &&
  38. cp ./index.js ./node_modules/fast-uri/index.js
  39. - name: Run tests
  40. run: |
  41. npm run test:unit
  42. env:
  43. NODE_OPTIONS: no-network-family-autoselection
  44. test:
  45. needs:
  46. - test-regression-check-node10
  47. uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5
  48. with:
  49. license-check: true
  50. lint: true
  51. node-versions: '["16", "18", "20", "22"]'