clj-rtc-e2e.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. name: Clojure RTC E2E
  2. on:
  3. push:
  4. branches: [master]
  5. paths:
  6. - 'clj-e2e/**'
  7. - '.github/workflows/clj-rtc-e2e.yml'
  8. - src/**
  9. - deps/**
  10. - packages/**
  11. pull_request:
  12. branches: [master]
  13. paths:
  14. - 'clj-e2e/**'
  15. - '.github/workflows/clj-rtc-e2e.yml'
  16. - src/**
  17. - deps/**
  18. - packages/**
  19. env:
  20. CLOJURE_VERSION: '1.11.1.1413'
  21. # This is the latest node version we can run.
  22. NODE_VERSION: '22'
  23. BABASHKA_VERSION: '1.0.168'
  24. jobs:
  25. rtc-e2e-test-build:
  26. name: Test
  27. runs-on: ubuntu-22.04
  28. if: "contains(github.event.head_commit.message, 'rtc')"
  29. steps:
  30. - name: Checkout
  31. uses: actions/checkout@v4
  32. - name: Set up Node
  33. uses: actions/setup-node@v4
  34. with:
  35. node-version: ${{ env.NODE_VERSION }}
  36. cache: 'yarn'
  37. cache-dependency-path: |
  38. yarn.lock
  39. - name: Set up Clojure
  40. uses: DeLaGuardo/[email protected]
  41. with:
  42. cli: ${{ env.CLOJURE_VERSION }}
  43. bb: ${{ env.BABASHKA_VERSION }}
  44. - name: Clojure cache
  45. uses: actions/cache@v4
  46. id: clojure-deps
  47. with:
  48. path: |
  49. ~/.m2/repository
  50. ~/.gitlibs
  51. key: ${{ runner.os }}-clojure-deps-${{ hashFiles('deps.edn') }}
  52. restore-keys: ${{ runner.os }}-clojure-deps-
  53. - name: Fetch Clojure deps
  54. if: steps.clojure-deps.outputs.cache-hit != 'true'
  55. run: clojure -A:cljs -P
  56. - name: Shadow-cljs cache
  57. uses: actions/cache@v4
  58. with:
  59. path: .shadow-cljs
  60. # ensure update cache every time
  61. key: ${{ runner.os }}-shadow-cljs-${{ github.sha }}
  62. # will match most recent upload
  63. restore-keys: |
  64. ${{ runner.os }}-shadow-cljs-
  65. - name: Fetch yarn deps
  66. run: yarn install
  67. env:
  68. PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
  69. # NOTE: require the app to be build with DEV-RELEASE flag
  70. - name: Prepare E2E test build
  71. run: |
  72. yarn gulp:build && clojure -M:cljs release app db-worker inference-worker --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-app-build
  73. rsync -avz --exclude node_modules --exclude android --exclude ios ./static/ ./public/
  74. ls -lR ./public
  75. - name: Run e2e tests
  76. run: cd clj-e2e && timeout 30m bb run-rtc-extra-test
  77. # env:
  78. # DEBUG: "pw:api"
  79. - name: Collect screenshots
  80. if: ${{ failure() }}
  81. uses: actions/upload-artifact@v4
  82. with:
  83. name: e2e-screenshots
  84. path: clj-e2e/e2e-dump/*
  85. retention-days: 1