ci.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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: [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. runs-on: ${{ matrix.os }}
  37. steps:
  38. - uses: actions/checkout@v4
  39. - uses: actions/setup-node@v4
  40. with:
  41. node-version: ${{ matrix.node-version }}
  42. - run: npm install
  43. # TODO: On Windows Node.js v11 these will fail but `make test` will succeed
  44. - if: matrix.node-version != '11.x'
  45. run: |
  46. npm run-script rebuild-tests
  47. npm test
  48. - run: make test