ci.yml 980 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: ci
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. node-version: [14, 16, 18]
  9. steps:
  10. - name: Checkout
  11. uses: actions/checkout@v2
  12. - name: Update APT
  13. run: sudo apt update
  14. - name: Install OS dependencies
  15. run: sudo apt install libboost-dev libboost-context-dev
  16. - name: Use Node ${{ matrix.node-version }}
  17. uses: actions/setup-node@v2
  18. with:
  19. node-version: ${{ matrix.node-version }}
  20. - name: Install packages
  21. run: npm install
  22. - name: Lint
  23. run: npx grunt lint
  24. - name: Test
  25. if: matrix.node-version != '18'
  26. run: npm test
  27. - name: Coverage
  28. if: matrix.node-version == '18'
  29. run: npm run coverage
  30. - name: Coveralls
  31. if: matrix.node-version == '18'
  32. uses: coverallsapp/github-action@master
  33. with:
  34. github-token: ${{ secrets.GITHUB_TOKEN }}