-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (51 loc) · 1.82 KB
/
e2e-testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: E2E Testing
on: [push]
jobs:
e2e-tests:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
actions: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.18.2"
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build frontend
run: yarn build
- name: List build files (debug)
run: ls -laR frontends/mit-open/build
- name: Build services
run: docker compose -f docker-compose-e2e-tests.yml build
- name: Start services
run: docker compose -f docker-compose-e2e-tests.yml up nginx web db --detach --wait
- name: Print the web service startup logs
run: docker compose -f docker-compose-e2e-tests.yml logs web
- name: List static files (debug)
run: docker compose -f docker-compose-e2e-tests.yml exec web ls /src/staticfiles -laR 2>&1 || true
- name: Apply test data
run: ./e2e_testing/scripts/apply-fixtures.sh
# - name: Run E2E tests
# run: docker compose -f docker-compose-e2e-tests.yml run e2e-tests
- name: Install Playwright Browsers
run: yarn --cwd e2e_testing playwright install --with-deps
- name: Curl home page (debug)
run: curl -v http://localhost:8063
- name: Run E2E tests
run: BASE_URL=http://localhost:8063 CI=true yarn --cwd e2e_testing test
- name: Setup Pages
if: always()
uses: actions/configure-pages@v3
- name: Upload artifact
if: always()
uses: actions/upload-pages-artifact@v2
with:
path: e2e_testing/playwright-report
- name: Deploy to GitHub Pages
if: always()
id: deployment
uses: actions/deploy-pages@v2