tests.yml 705 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Node.js CI
  2. on:
  3. push:
  4. branches: [main, staging, "release/**"]
  5. pull_request:
  6. branches: [main, staging, "release/**"]
  7. jobs:
  8. test:
  9. name: Test
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. node-version: ["lts/*"]
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v3
  17. - name: Setup environment
  18. run: mv .env.example .env
  19. - name: Setup pnpm
  20. uses: pnpm/action-setup@v2.2.4
  21. with:
  22. version: 8
  23. run_install: true
  24. - name: Setup node
  25. uses: actions/setup-node@v3
  26. with:
  27. node-version: ${{ matrix.node }}
  28. cache: pnpm
  29. - name: Run tests
  30. run: pnpm test