91ad702384e91620ed7ddf47b9b9334b3f2308bcd2a636192466636379c10898b2f8ace3478af6ddbdb38aa1d54eb3fad4d29532cc2de0d903d97c011ebe7e 1.7 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. ci:
  15. strategy:
  16. fail-fast: false
  17. matrix: # TODO: Enable 23.x after nodejs/nan#979 or similar.
  18. node-version: [22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
  19. os: [windows-latest]
  20. include:
  21. - node-version: lts/*
  22. os: macos-13 # macOS on Intel
  23. - node-version: lts/*
  24. os: macos-latest # macOS on arm64
  25. - node-version: lts/*
  26. os: ubuntu-latest # Linux on x64
  27. - node-version: lts/*
  28. os: ubuntu-24.04-arm # Linux on arm64
  29. - node-version: lts/*
  30. os: windows-2025
  31. - node-version: 14.x
  32. os: windows-2019
  33. - node-version: 12.x
  34. os: windows-2019
  35. - node-version: 10.x
  36. os: windows-2019
  37. - node-version: 8.x
  38. os: windows-2019
  39. runs-on: ${{ matrix.os }}
  40. steps:
  41. - uses: actions/checkout@v4
  42. - uses: actions/setup-node@v4
  43. with:
  44. node-version: ${{ matrix.node-version }}
  45. - run: npm install
  46. # TODO: On Windows Node.js v11 these will fail but `make test` will succeed
  47. - if: matrix.node-version != '11.x'
  48. run: |
  49. npm run-script rebuild-tests
  50. npm test
  51. - run: make test