test.js.yml 1012 B

12345678910111213141516171819202122232425262728293031323334
  1. # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
  3. name: build
  4. on:
  5. push:
  6. branches: [master]
  7. pull_request:
  8. branches: [master]
  9. env:
  10. FORCE_COLOR: 2
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. node-version: [10.x, 12.x, 14.x, 15.x]
  17. # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
  18. # For now is not possible to target LTS verssions =/ check progress here https://github.com/actions/setup-node/issues/26
  19. steps:
  20. - uses: actions/checkout@v2
  21. - name: Use Node.js ${{ matrix.node-version }}
  22. uses: actions/setup-node@v2
  23. with:
  24. node-version: ${{ matrix.node-version }}
  25. - run: npm ci
  26. - run: npm run build --if-present
  27. - run: npm run lint
  28. - run: npm test