test.yml 579 B

12345678910111213141516171819202122232425262728
  1. name: test
  2. on:
  3. workflow_call:
  4. pull_request:
  5. branches: [main]
  6. push:
  7. branches: [main]
  8. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. node-version: [14.x, 16.x, 18.x]
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Use Node.js ${{ matrix.node-version }}
  17. uses: actions/setup-node@v3
  18. with:
  19. node-version: ${{ matrix.node-version }}
  20. cache: yarn
  21. - name: Install dependencies
  22. run: yarn --frozen-lockfile
  23. - name: Run test
  24. run: yarn test