test.yml 498 B

123456789101112131415161718192021222324252627282930
  1. name: Test
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. npm-test:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. matrix:
  12. node-version: ['10', '12', '14']
  13. steps:
  14. - uses: actions/checkout@v2
  15. - uses: actions/setup-node@v1
  16. with:
  17. node-version: ${{ matrix.node-version }}
  18. - run: |
  19. npm install
  20. npm test
  21. - uses: coverallsapp/github-action@master
  22. with:
  23. github-token: ${{ secrets.GITHUB_TOKEN }}