ci.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
  2. # https://github.com/actions/setup-node
  3. # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
  4. name: ci
  5. on:
  6. push:
  7. # branches: [main]
  8. pull_request:
  9. # branches: [main]
  10. workflow_dispatch:
  11. permissions:
  12. contents: read
  13. jobs:
  14. pre-commit:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v4
  18. - uses: pre-commit/action@v3.0.1
  19. ci:
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. node-version: [25.x, 24.x, 23.x, 22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
  24. os: [windows-latest]
  25. include:
  26. - node-version: lts/*
  27. os: macos-13 # macOS on Intel
  28. - node-version: lts/*
  29. os: macos-latest # macOS on arm64
  30. - node-version: lts/*
  31. os: ubuntu-latest # Linux on x64
  32. - node-version: lts/*
  33. os: ubuntu-24.04-arm # Linux on arm64
  34. - node-version: lts/*
  35. os: windows-2025
  36. - node-version: lts/*
  37. os: windows-11-arm # Windows on arm64
  38. runs-on: ${{ matrix.os }}
  39. steps:
  40. - uses: actions/checkout@v4
  41. - uses: actions/setup-node@v4
  42. with:
  43. node-version: ${{ matrix.node-version }}
  44. - run: npm install
  45. # TODO: On Windows Node.js v11 these will fail but `make test` will succeed
  46. - if: matrix.node-version != '11.x'
  47. run: |
  48. npm run-script rebuild-tests
  49. npm test
  50. - run: make test