test.yml 845 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Node CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. tags:
  7. - '!*'
  8. pull_request:
  9. jobs:
  10. build:
  11. name: Test Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
  12. strategy:
  13. matrix:
  14. os: [ubuntu-latest, macos-latest, windows-latest]
  15. node-version: [8.x, 10.x, 12.x, 14.x]
  16. runs-on: ${{ matrix.os }}
  17. steps:
  18. - uses: actions/checkout@v1
  19. - name: Use Node.js ${{ matrix.node-version }}
  20. uses: actions/setup-node@v1
  21. with:
  22. node-version: ${{ matrix.node-version }}
  23. - name: Print Node.js Version
  24. run: node --version
  25. - name: Install Dependencies
  26. run: npm install
  27. env:
  28. CI: true
  29. - name: Run "build" step
  30. run: npm run build --if-present
  31. env:
  32. CI: true
  33. - name: Run tests
  34. run: npm test
  35. env:
  36. CI: true