nodejs-test.yml 551 B

123456789101112131415161718192021222324252627
  1. name: Node CI
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ${{ matrix.os }}
  6. strategy:
  7. matrix:
  8. os: [windows-latest, macOS-latest, ubuntu-latest]
  9. node: [18.x, 19.x, 20.x]
  10. steps:
  11. - uses: actions/checkout@v4
  12. - name: Use Node.js ${{ matrix.node-version }}
  13. uses: actions/setup-node@v3
  14. with:
  15. node-version: ${{ matrix.node-version }}
  16. - name: npm install, build, and test
  17. run: |
  18. npm install
  19. npm run build --if-present
  20. npm test
  21. env:
  22. CI: true