Skip to content

Commit 3372863

Browse files
committed
CCM-10980: standardise test reports
1 parent b1b39ab commit 3372863

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

.github/actions/acceptance-tests/action.yaml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,8 @@ runs:
4444
run: |
4545
make test-${{ inputs.testType }}
4646
47-
- name: Archive ui-e2e test results
48-
if: ${{ inputs.testType == 'ui-e2e' }}
47+
- name: Archive test results
4948
uses: actions/upload-artifact@v4
5049
with:
51-
name: UI E2E test report
52-
path: "tests/test-team/playwright-report"
53-
54-
- name: Archive ui-component test results
55-
if: ${{ inputs.testType == 'ui-component' }}
56-
uses: actions/upload-artifact@v4
57-
with:
58-
name: UI-component test report
59-
path: "tests/test-team/playwright-report"
60-
61-
- name: Archive api test results
62-
if: ${{ inputs.testType == 'api' }}
63-
uses: actions/upload-artifact@v4
64-
with:
65-
name: API test report
66-
path: "tests/test-team/playwright-report"
67-
68-
- name: Archive accessibility results
69-
if: ${{ inputs.testType == 'accessibility' }}
70-
uses: actions/upload-artifact@v4
71-
with:
72-
name: accessibility
73-
path: "tests/accessibility/.reports/accessibility"
50+
name: ${{ inputs.testType }} - test report
51+
path: "tests/acceptance-test-report"

scripts/tests/accessibility.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,11 @@ npm run app:start --prefix frontend
1919
npm run app:wait --prefix frontend
2020

2121
npm run test:accessibility -w tests/accessibility
22+
TEST_EXIT_CODE=$?
23+
echo "TEST_EXIT_CODE=$TEST_EXIT_CODE"
24+
25+
cp ./tests/accessibility/.reports/accessibility ./tests/acceptance-test-report
2226

2327
npm run accessibility-test-teardown -w tests/accessibility
28+
29+
exit $TEST_EXIT_CODE

scripts/tests/api.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ cd "$(git rev-parse --show-toplevel)"
55
npx playwright install --with-deps > /dev/null
66
cd tests/test-team
77
npm run test:api
8+
TEST_EXIT_CODE=$?
9+
echo "TEST_EXIT_CODE=$TEST_EXIT_CODE"
10+
11+
cp tests/test-team/playwright-report ./tests/acceptance-test-report
12+
13+
exit $TEST_EXIT_CODE

scripts/tests/ui-component.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ cd "$(git rev-parse --show-toplevel)"
55
npx playwright install --with-deps > /dev/null
66
cd tests/test-team
77
npm run test:local-ui
8+
TEST_EXIT_CODE=$?
9+
echo "TEST_EXIT_CODE=$TEST_EXIT_CODE"
10+
11+
cp tests/test-team/playwright-report ./tests/acceptance-test-report
12+
13+
exit $TEST_EXIT_CODE

scripts/tests/ui-e2e.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ cd "$(git rev-parse --show-toplevel)"
55
npx playwright install --with-deps > /dev/null
66
cd tests/test-team
77
npm run test:e2e
8+
TEST_EXIT_CODE=$?
9+
echo "TEST_EXIT_CODE=$TEST_EXIT_CODE"
10+
11+
cp tests/test-team/playwright-report ./tests/acceptance-test-report
12+
13+
exit $TEST_EXIT_CODE

0 commit comments

Comments
 (0)