@@ -74,76 +74,46 @@ jobs:
7474 name : Studio Web test-suites
7575 timeout-minutes : 60
7676 runs-on : ubuntu-latest
77- strategy :
78- fail-fast : false
79- matrix :
80- shardIndex : [1, 2, 3]
81- shardTotal : [3]
8277 steps :
8378 - uses : actions/checkout@v6
8479 with :
8580 persist-credentials : false
81+
8682 - uses : actions/setup-node@v6
8783 with :
8884 node-version : lts/*
89- - name : Install and run the back-end API, needed for end-to-end testing
85+
86+ - name : Install and run the back-end API
9087 run : |
9188 git clone https://github.com/ReadAlongs/Studio
9289 cd Studio
9390 pip install -e .[api]
9491 ./run-web-api.sh &
95- # wait for the API to be up
96- curl --retry 20 --retry-delay 1 --retry-all-errors http://localhost:8000/api/v1/langs
92+
9793 - name : Install everything
9894 run : npm ci
95+
9996 - name : Run studio-web in the background
10097 run : |
10198 npx nx build web-component
10299 npx nx run-many --targets=serve,serve-fr,serve-es --projects=web-component,studio-web --parallel 6 &
103100
101+ - name : Wait for the servers to be up
102+ run : |
104103 # wait for the studio web to be up
105104 sleep 50
106105 curl --retry 20 --retry-delay 10 --retry-all-errors http://localhost:4200 > /dev/null
106+ # Make sure the back-end API is up too
107+ curl --retry 20 --retry-delay 1 --retry-all-errors http://localhost:8000/api/v1/langs
108+
107109 - name : Run Playwright tests for studio-web
108110 run : |
109111 npx playwright install --with-deps chromium
110- npx nx e2e studio-web --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
111- - name : Upload blob report to GitHub Actions Artifacts
112- if : ${{ !cancelled() }}
113- uses : actions/upload-artifact@v6
114- with :
115- name : blob-report-${{ matrix.shardIndex }}
116- path : packages/studio-web/blob-report
117- retention-days : 1
118-
119- merge-reports :
120- # Merge reports after playwright-tests, even if some shards have failed
121- if : ${{ !cancelled() }}
122- needs : [studio-e2e-tests]
123- name : " Merge playwright reports from studio-web end-to-end tests"
124- runs-on : ubuntu-latest
125- steps :
126- - uses : actions/checkout@v6
127- with :
128- persist-credentials : false
129- - uses : actions/setup-node@v6
130- with :
131- node-version : lts/*
132- - name : Install everything
133- run : npm ci
134- - name : Download blob reports from GitHub Actions Artifacts
135- uses : actions/download-artifact@v7
136- with :
137- path : all-blob-reports
138- pattern : blob-report-*
139- merge-multiple : true
140-
141- - name : Merge into a single HTML Report
142- run : npx playwright merge-reports --reporter=html,github ./all-blob-reports
112+ npx nx e2e studio-web
143113
144- - name : Upload single HTML report
114+ - name : Upload HTML report
145115 uses : actions/upload-artifact@v6
146116 with :
147- name : html -report--attempt-${{ github.run_attempt }}
148- path : playwright-report
117+ name : playwright -report--attempt-${{ github.run_attempt }}
118+ path : packages/studio-web/ playwright-report
149119 retention-days : 5
0 commit comments