build.yml 926 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Build and Test
  2. on:
  3. pull_request:
  4. branches: [master]
  5. jobs:
  6. build:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v3
  10. - name: Setup Node.js
  11. uses: actions/setup-node@v1
  12. with:
  13. node-version: 18.x
  14. - name: Setup Corepack
  15. run: corepack enable
  16. - name: Install dependencies
  17. env:
  18. YARN_ENABLE_IMMUTABLE_INSTALLS: false
  19. run: yarn install
  20. - name: Check Typescript
  21. run: npm run tsc
  22. - name: Check ESLint
  23. run: npm run eslint
  24. - name: Check Prettier
  25. run: npm run format
  26. - name: Run unit tests
  27. run: npm run test
  28. - name: Install production dependencies
  29. run: |
  30. rm -rf node_modules
  31. yarn workspaces focus --all --production
  32. - name: Build
  33. env:
  34. NODE_OPTIONS: "--openssl-legacy-provider"
  35. run: npm run build