build-and-test.yml 929 B

123456789101112131415161718192021222324252627282930313233
  1. # This workflow will do a clean installation 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: Node.js CI
  4. on:
  5. push:
  6. branches: [ master ]
  7. pull_request:
  8. branches: [ master ]
  9. pull_request_target :
  10. branches: [ master ]
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. node-version: [12.x, 14.x, 16.x]
  17. # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
  18. steps:
  19. - uses: actions/checkout@v3
  20. - name: Use Node.js ${{ matrix.node-version }}
  21. uses: actions/setup-node@v3
  22. with:
  23. node-version: ${{ matrix.node-version }}
  24. cache: 'npm'
  25. - run: yarn install
  26. - run: yarn build
  27. - run: yarn test | npx tap-pessimist