-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (123 loc) · 3.49 KB
/
ci.yaml
File metadata and controls
155 lines (123 loc) · 3.49 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: ITP
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
env:
REPORT_FORMATTER: mocha-reporter-gha
jobs:
build:
name: Build
runs-on: ubuntu-latest
environment: QA
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- uses: actions/upload-artifact@v4
with:
name: build
path: dist
- name: Run docs-generator
run: npm run docs-generator
- name: Check for documentation changes
run: |
if [[ -n $(git status --porcelain docs/) ]]; then
echo "The following files in the docs directory and/or the commands related to them have been modified:"
git status --porcelain docs/
echo "Please run 'npm run docs-generator' locally and commit the changes."
exit 1
fi
- name: Audit
run: npm audit --audit-level=high
- name: Lint
run: npm run lint
- name: Copyright Lint
run: npm run lint:copyright
- name: Test (Formatting)
run: npm run test:formatting
test_service:
name: Tests (Service Client)
runs-on: ubuntu-latest
environment: QA
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- uses: actions/download-artifact@v4
with:
name: build
- name: Test (Service Client)
run: npm run test:service
env:
ITP_API_URL: ${{ vars.ITP_API_URL }}
ITP_ISSUER_URL: ${{ vars.ITP_ISSUER_URL }}
ITP_SERVICE_CLIENT_ID: ${{ vars.ITP_SERVICE_CLIENT_ID }}
ITP_SERVICE_CLIENT_SECRET: ${{ secrets.ITP_SERVICE_CLIENT_SECRET }}
test_native:
name: Tests (Native Client)
runs-on: ubuntu-latest
environment: QA
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- uses: actions/download-artifact@v4
with:
name: build
- name: Test (Native Client)
run: npm run test:native
env:
ITP_API_URL: ${{ vars.ITP_API_URL }}
ITP_ISSUER_URL: ${{ vars.ITP_ISSUER_URL }}
ITP_NATIVE_TEST_CLIENT_ID: ${{ vars.ITP_NATIVE_TEST_CLIENT_ID }}
ITP_TEST_USER_EMAIL: ${{ vars.ITP_TEST_USER_EMAIL }}
ITP_TEST_USER_PASSWORD: ${{ secrets.ITP_TEST_USER_PASSWORD }}
test_mocked:
name: Tests (Mocked HTTP traffic)
runs-on: ubuntu-latest
environment: QA
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- uses: actions/download-artifact@v4
with:
name: build
- name: Test
run: npm run test:mocked