-
Notifications
You must be signed in to change notification settings - Fork 25
133 lines (111 loc) · 4.05 KB
/
build.yml
File metadata and controls
133 lines (111 loc) · 4.05 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
name: Build
on:
push:
branches: [master, branch-*, dogfood-*]
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: write
jobs:
build:
name: Build and Test
runs-on: github-ubuntu-latest-s
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: jdx/mise-action@e79ddf65a11cec7b0e882bedced08d6e976efb2d # v3.6.2
with:
version: 2025.11.2
- uses: SonarSource/vault-action-wrapper@v3
id: secrets
with:
secrets: |
development/artifactory/token/${{ github.repository_owner }}-${{ github.event.repository.name }}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN;
- name: Configure npm registry
run: |
npm config set //repox.jfrog.io/artifactory/api/npm/:_authToken=${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
npm config set registry https://repox.jfrog.io/artifactory/api/npm/npm/
- name: Install dependencies
run: npm ci
- name: Build
run: |
npm run build
npx knip
(cd build && npm pack)
env:
VERSION: SNAPSHOT
- name: Test
run: npm test
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: build-artifacts
path: |
build/
coverage/
node_modules/
test-report.xml
if-no-files-found: error
qa-linux:
name: QA Linux
needs: build
runs-on: github-ubuntu-latest-s
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
steps: &qa-steps
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: jdx/mise-action@e79ddf65a11cec7b0e882bedced08d6e976efb2d # v3.6.2
with:
version: 2025.11.2
mise_toml: |
[tools]
java = "21.0"
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: build-artifacts
path: .
- uses: SonarSource/vault-action-wrapper@v3
id: secrets
with:
secrets: |
development/artifactory/token/${{ github.repository_owner }}-${{ github.event.repository.name }}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN;
- name: Configure npm registry
run: |
npm config set //repox.jfrog.io/artifactory/api/npm/:_authToken=${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
npm config set registry https://repox.jfrog.io/artifactory/api/npm/npm/
- name: Run integration tests
env:
ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
run: npm run test-integration
shell: bash
qa-windows:
name: QA Windows
needs: build
runs-on: windows-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
steps: *qa-steps
analyze:
name: Analyze in SonarCloud
needs: build
runs-on: github-ubuntu-latest-s
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: jdx/mise-action@e79ddf65a11cec7b0e882bedced08d6e976efb2d # v3.6.2
with:
version: 2025.11.2
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: build-artifacts
path: .
- uses: SonarSource/vault-action-wrapper@v3
id: secrets
with:
secrets: |
development/kv/data/sonarcloud token | SONAR_TOKEN;
- name: Run SonarQube analysis
env:
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
run: node ./ci-analysis.js