@@ -74,194 +74,6 @@ jobs:
7474 package.json
7575 retention-days : 1
7676
77- run-integration-apiTests :
78- name : Integration API Tests (Node.js v${{ matrix.node-version }})
79- needs : [generate-node-version-matrix, build]
80- runs-on : ubuntu-latest
81- timeout-minutes : 15
82- strategy :
83- fail-fast : false
84- matrix :
85- node-version : ${{ fromJSON(needs.generate-node-version-matrix.outputs.node-versions) }}
86-
87- steps :
88- - name : Checkout code
89- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
90-
91- - name : Setup Node.js ${{ matrix.node-version }}
92- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
93- with :
94- node-version : ${{ matrix.node-version }}
95- package-manager-cache : false
96-
97- - name : Download build artifacts
98- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
99- with :
100- name : harper-build-artifacts-node-${{ matrix.node-version }}
101-
102- - name : Setup Harper
103- env :
104- DEFAULTS_MODE : ' dev'
105- HDB_ADMIN_USERNAME : ' admin'
106- HDB_ADMIN_PASSWORD : ' password'
107- ROOTPATH : ' /tmp/hdb'
108- OPERATIONSAPI_NETWORK_PORT : 9925
109- LOGGING_LEVEL : ' debug'
110- LOGGING_STDSTREAMS : true
111- THREADS_COUNT : 1
112- THREADS_DEBUG : false
113- NODE_HOSTNAME : ' localhost'
114- run : |
115- rm -rf /tmp/hdb
116- mkdir -p /tmp/hdb/log
117- node ./dist/bin/harper.js install > /tmp/hdb/log/install-stdout.log 2> /tmp/hdb/log/install-stderr.log
118- node ./dist/bin/harper.js start > /tmp/hdb/log/start-stdout.log 2> /tmp/hdb/log/start-stderr.log &
119- echo "Waiting for Harper to be ready on port 9925..."
120- timeout 120 bash -c 'until nc -z localhost 9925 2>/dev/null; do sleep 0.5; done'
121- echo "Harper is ready."
122-
123- - name : Run API Tests
124- id : run-api-tests
125- env :
126- HDB_ADMIN_USERNAME : ' admin'
127- HDB_ADMIN_PASSWORD : ' password'
128- run : npm run test:integration:api-tests
129-
130- - name : Upload Harper logs
131- if : failure()
132- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
133- with :
134- name : harper-integration-api-test-logs-node-${{ matrix.node-version }}
135- path : /tmp/hdb/log/
136- retention-days : 3
137- if-no-files-found : ignore
138-
139- run-integration-apiTests-bun :
140- name : Integration API Tests (Bun)
141- if : false
142- needs : [build]
143- runs-on : ubuntu-latest
144- timeout-minutes : 15
145-
146- steps :
147- - name : Checkout code
148- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
149-
150- - name : Setup Node.js
151- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
152- with :
153- node-version : 24
154- package-manager-cache : false
155-
156- - name : Setup Bun
157- uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
158-
159- - name : Download build artifacts
160- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
161- with :
162- name : harper-build-artifacts-node-24
163-
164- - name : Setup Harper
165- env :
166- DEFAULTS_MODE : ' dev'
167- HDB_ADMIN_USERNAME : ' admin'
168- HDB_ADMIN_PASSWORD : ' password'
169- ROOTPATH : ' /tmp/hdb'
170- OPERATIONSAPI_NETWORK_PORT : 9925
171- LOGGING_LEVEL : ' debug'
172- LOGGING_STDSTREAMS : true
173- THREADS_COUNT : 1
174- THREADS_DEBUG : false
175- NODE_HOSTNAME : ' localhost'
176- run : |
177- rm -rf /tmp/hdb
178- mkdir -p /tmp/hdb/log
179- node ./dist/bin/harper.js install > /tmp/hdb/log/install-stdout.log 2> /tmp/hdb/log/install-stderr.log
180- sleep 10
181- bun ./dist/bin/harper.js start > /tmp/hdb/log/start-stdout.log 2> /tmp/hdb/log/start-stderr.log &
182- sleep 10
183-
184- - name : Run API Tests
185- id : run-api-tests
186- env :
187- HDB_ADMIN_USERNAME : ' admin'
188- HDB_ADMIN_PASSWORD : ' password'
189- run : npm run test:integration:api-tests
190-
191- - name : Upload Harper logs
192- if : failure()
193- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
194- with :
195- name : harper-integration-api-test-logs-bun
196- path : /tmp/hdb/log/
197- retention-days : 3
198- if-no-files-found : ignore
199-
200- run-integration-apiTests-windows :
201- name : Integration API Tests (Windows, Node.js v24)
202- needs : [build-windows]
203- runs-on : windows-latest
204- timeout-minutes : 15
205-
206- steps :
207- - name : Checkout code
208- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
209-
210- - name : Setup Node.js 24
211- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
212- with :
213- node-version : 24
214- package-manager-cache : false
215-
216- - name : Download build artifacts
217- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
218- with :
219- name : harper-build-artifacts-windows
220-
221- - name : Setup Harper
222- env :
223- DEFAULTS_MODE : ' dev'
224- HDB_ADMIN_USERNAME : ' admin'
225- HDB_ADMIN_PASSWORD : ' password'
226- ROOTPATH : ${{ runner.temp }}/hdb
227- OPERATIONSAPI_NETWORK_PORT : 9925
228- LOGGING_LEVEL : ' debug'
229- LOGGING_STDSTREAMS : true
230- THREADS_COUNT : 1
231- THREADS_DEBUG : false
232- NODE_HOSTNAME : ' localhost'
233- run : |
234- New-Item -ItemType Directory -Force -Path ${{ runner.temp }}/hdb/log
235- node ./dist/bin/harper.js install > ${{ runner.temp }}/hdb/log/install-stdout.log 2> ${{ runner.temp }}/hdb/log/install-stderr.log
236- Start-Process node -ArgumentList "./dist/bin/harper.js start" -RedirectStandardOutput "${{ runner.temp }}/hdb/log/start-stdout.log" -RedirectStandardError "${{ runner.temp }}/hdb/log/start-stderr.log" -PassThru
237- Write-Host "Waiting for Harper to be ready on port 9925..."
238- $deadline = (Get-Date).AddSeconds(120)
239- do {
240- Start-Sleep -Milliseconds 500
241- $client = New-Object System.Net.Sockets.TcpClient
242- $connected = $client.ConnectAsync('localhost', 9925).Wait(2000)
243- if ($connected) { $client.Close(); $ready = $true }
244- else { $client.Close() }
245- } until ($ready -or (Get-Date) -gt $deadline)
246- if (-not $ready) { Write-Error "Harper did not start within 120s"; exit 1 }
247- Write-Host "Harper is ready."
248-
249- - name : Run API Tests
250- id : run-api-tests
251- env :
252- HDB_ADMIN_USERNAME : ' admin'
253- HDB_ADMIN_PASSWORD : ' password'
254- run : npm run test:integration:api-tests
255-
256- - name : Upload Harper logs
257- if : failure()
258- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
259- with :
260- name : harper-integration-api-test-logs-windows
261- path : ${{ runner.temp }}/hdb/log/
262- retention-days : 3
263- if-no-files-found : ignore
264-
26577 run-integration-tests :
26678 name : Integration Tests ${{matrix.shard}}/4 (Node.js v${{ matrix.node-version }})
26779 runs-on : ubuntu-latest
0 commit comments