node.js.yml 872 B

12345678910111213141516171819202122232425262728293031
  1. # This workflow will do a clean install of node dependencies, cache/restore them, 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: [push, pull_request]
  5. jobs:
  6. build:
  7. runs-on: ubuntu-latest
  8. strategy:
  9. matrix:
  10. node-version: [16]
  11. steps:
  12. - uses: actions/checkout@v2
  13. - name: Use Node.js ${{ matrix.node-version }}
  14. uses: actions/setup-node@v2
  15. with:
  16. node-version: ${{ matrix.node-version }}
  17. cache: 'npm'
  18. - run: npm ci
  19. - run: npm run build --if-present
  20. - run: npm test
  21. - run: npm run coverage --if-present
  22. - name: Coveralls
  23. uses: coverallsapp/github-action@master
  24. with:
  25. github-token: ${{ secrets.GITHUB_TOKEN }}