build.yml 1.6 KB

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