Refactor edge agent test with waitFor utility and update GitHub Actions workflow

- Introduced `waitFor` utility in edge agent tests for more reliable condition polling.
- Adjusted test assertions to use `waitFor` for verifying agent polling activity.
- Added separate GitHub Actions jobs for `edge-agent` and `edge-broker` to improve test isolation.
This commit is contained in:
Jeppe Bundgaard
2026-04-14 16:31:47 +02:00
parent f51b054cf5
commit 17d855d04f
2 changed files with 73 additions and 2 deletions
+46
View File
@@ -43,6 +43,52 @@ jobs:
if-no-files-found: warn
retention-days: 1
edge-agent:
name: Edge Agent (required)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: services/edge-agent/package-lock.json
- name: Install dependencies
working-directory: services/edge-agent
run: npm ci
- name: Run edge agent tests
working-directory: services/edge-agent
run: npm test
edge-broker:
name: Edge Broker (required)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: services/edge-broker/package-lock.json
- name: Install dependencies
working-directory: services/edge-broker
run: npm ci
- name: Run edge broker tests
working-directory: services/edge-broker
run: npm test
integration:
name: Integration (advisory)
runs-on: ubuntu-latest