-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaction.yaml
More file actions
66 lines (60 loc) · 1.7 KB
/
action.yaml
File metadata and controls
66 lines (60 loc) · 1.7 KB
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
name: Acceptance tests
description: "Run acceptance tests for this repo"
inputs:
testType:
description: Type of test to run
required: true
default: main
targetEnvironment:
description: Name of the environment under test
required: true
default: main
targetAccountGroup:
description: Name of the account group under test
default: nhs-notify-digital-letters-dev
required: true
targetComponent:
description: Name of the component under test
default: dl
runs:
using: "composite"
steps:
- name: Get Node version
id: nodejs_version
shell: bash
run: |
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
- uses: ./.github/actions/node-install
with:
node-version: ${{ steps.nodejs_version.outputs.nodejs_version }}
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
- name: "Repo setup"
shell: bash
run: |
npm ci
- name: "Generate dependencies"
shell: bash
run: |
npm run generate-dependencies
- name: Run test - ${{ inputs.testType }}
shell: bash
run: |
set -euo pipefail
case "$TEST_TYPE" in
main|integration|unit)
make "test-$TEST_TYPE"
;;
*)
echo "Invalid testType: $TEST_TYPE" >&2
exit 1
;;
esac
env:
TEST_TYPE: ${{ inputs.testType }}
ENVIRONMENT: ${{ inputs.targetEnvironment }}
- name: Archive integration test results
if: ${{ inputs.testType == 'integration' }}
uses: actions/upload-artifact@v4
with:
name: Integration test report
path: "tests/playwright/playwright-report"