test.js.yml 976 B

1234567891011121314151617181920212223242526272829303132
  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. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. node-version: [10.x, 12.x, 14.x, 15.x]
  15. # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
  16. # For now is not possible to target LTS verssions =/ check progress here https://github.com/actions/setup-node/issues/26
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Use Node.js ${{ matrix.node-version }}
  20. uses: actions/setup-node@v1
  21. with:
  22. node-version: ${{ matrix.node-version }}
  23. - run: npm ci
  24. - run: npm run build --if-present
  25. - run: npm run lint
  26. - run: npm test