-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (53 loc) · 1.95 KB
/
e2e.run.tests.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
name: e2e:test:all test the application end to end
on: [push,pull_request_target]
jobs:
e2e-tests:
name: Run all E2E tests
runs-on: ubuntu-latest
steps:
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: 21
- name: Checkout
uses: actions/checkout@master
- name: E2E | Boot up test system
run: |
cd authentik/
./database.unpack.sh
docker compose up -d
cd ../frontend
cp .env.dist .env
npm install
npm run prod &
cd ../presenter
cp .env.dist .env
export PORT=3001
npm install
npm run prod &
- name: Install cucumber-json-formatter
run: |
wget --no-verbose -O /opt/cucumber-json-formatter "https://github.com/cucumber/json-formatter/releases/download/v19.0.0/cucumber-json-formatter-linux-386"
chmod +x /opt/cucumber-json-formatter
sudo ln -fs /opt/cucumber-json-formatter /usr/bin/cucumber-json-formatter
- name: E2E | Run all tests
id: e2e-run
uses: cypress-io/github-action@v6
with:
working-directory: tests
- name: E2E | if tests failed, compile html report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
run: |
cd cypress/
npx tsx create-cucumber-html-report.ts
working-directory: tests
- name: Get PR number
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: jwalton/gh-find-current-pr@master
id: pr-number
- name: E2E | if tests failed, upload report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: dreammall-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
path: /home/runner/work/dreammall.earth/dreammall.earth/tests/cypress/reports/dreammall-e2e_html_report