build.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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: 22.x
  14. - name: Setup Corepack
  15. run: corepack enable
  16. - name: Install development 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: Development build
  29. env:
  30. NODE_ENV: development
  31. run: npm run build:dev
  32. - name: Run integration tests
  33. env:
  34. NODE_ENV: development
  35. # needs an invalid URL to prevent CORS related delays
  36. CORIOLIS_URL: http://invalidd.it/
  37. run: |
  38. touch .not-first-launch
  39. npm run start &
  40. sleep 5
  41. npm run e2e
  42. - name: Upload failure screenshots
  43. uses: actions/upload-artifact@v4
  44. if: failure()
  45. with:
  46. name: cypress-screenshots
  47. path: cypress/screenshots
  48. - name: Install production dependencies
  49. run: |
  50. rm -rf node_modules
  51. yarn workspaces focus --all --production
  52. - name: Production build
  53. env:
  54. NODE_OPTIONS: "--openssl-legacy-provider"
  55. run: npm run build:prod