-
Notifications
You must be signed in to change notification settings - Fork 15
176 lines (156 loc) · 4.53 KB
/
Copy pathci.yml
File metadata and controls
176 lines (156 loc) · 4.53 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: CI Validation
on:
pull_request:
branches:
- "main"
- "feature/*"
- "renovate/*"
jobs:
version-check:
name: Version Consistency Check
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft == false && (
contains(github.event.pull_request.head.ref, 'skip-ci') == false
)
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate version consistency
run: |
chmod +x bin/validate-versions.sh
bin/validate-versions.sh
ui-build-test:
name: UI Build & Tests
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft == false && (
contains(github.event.pull_request.head.ref, 'skip-ci') == false
)
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Install dependencies
working-directory: ui
run: npm ci
- name: Build UI
id: ui-build
working-directory: ui
run: |
echo "::group::Building UI"
npm run build-prod
echo "::endgroup::"
- name: Validation (format check)
id: ui-validation
working-directory: ui
run: |
echo "::group::Validating code format"
npm run format:check
echo "::endgroup::"
- name: Lint UI
id: ui-lint
working-directory: ui
run: |
echo "::group::Linting UI code"
npm run lint
echo "::endgroup::"
- name: Test UI
id: ui-test
working-directory: ui
run: |
echo "::group::Running UI tests"
npm run ci-test
echo "::endgroup::"
api-build-test:
name: API Build & Tests
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft == false && (
contains(github.event.pull_request.head.ref, 'skip-ci') == false
)
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
cache: "maven"
- name: Setup SDKMAN
uses: sdkman/sdkman-action@master
with:
candidate: maven
version: "3.9.6"
- name: Maven version
run: mvn -version
- name: Build API module
id: api-build
run: |
echo "::group::Building API module"
mvn clean install -pl api -am --batch-mode
echo "::endgroup::"
- name: Run API unit tests
id: api-tests
run: |
echo "::group::Running API unit tests"
mvn test -pl api --batch-mode
echo "::endgroup::"
# integration-tests:
# name: Integration Tests
# runs-on: ubuntu-latest
# needs: [ ui-build-test, api-build-test ]
# if: |
# github.event.pull_request.draft == false && (
# contains(github.event.pull_request.head.ref, 'skip-ci') == false
# )
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Set up JDK 21
# uses: actions/setup-java@v4
# with:
# java-version: "21"
# distribution: "temurin"
# cache: "maven"
#
# - name: Setup SDKMAN
# uses: sdkman/sdkman-action@master
# with:
# candidate: maven
# version: "3.9.6"
#
# - name: Maven version
# run: mvn -version
#
# - name: Build API and test modules
# id: build-all
# run: |
# echo "::group::Building API and test modules"
# mvn clean install -pl api,test -am -DskipTests --batch-mode
# echo "::endgroup::"
#
# - name: Run API integration tests
# id: integration-tests
# run: |
# echo "::group::Running API integration tests"
# mvn verify -pl test -Prun-api-tests --batch-mode
# echo "::endgroup::"
# env:
# OAUTH_CLIENTID: "${{secrets.OAUTH_CLIENTID}}"
# OAUTH_CLIENTSECRET: "${{secrets.OAUTH_CLIENTSECRET}}"
# OAUTH_AUDIENCE: "${{secrets.OAUTH_AUDIENCE}}"
# OAUTH_ISSUER: "${{secrets.OAUTH_ISSUER}}"
# OKTA_USERNAME: "${{secrets.OKTA_USERNAME}}"
# OKTA_PASSWORD: "${{secrets.OKTA_PASSWORD}}"
# OKTA_URL: "${{secrets.OKTA_URL}}"
# BASE_URL: "http://localhost:8080"
# APP_START_CHECK_RETRY_LIMIT: 100