mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-03 11:42:04 +08:00
Wire the test toolchain into developer-facing entry points and CI: - Makefile gains test, test-it, test-e2e and coverage targets; the help banner advertises them alongside the existing build commands so contributors do not need to memorise the underlying mvn invocations. - A new Test workflow runs three sequenced jobs: unit (mvn test, skipping the integration phase), integration (mvn verify, skipping unit phase, running with TESTCONTAINERS_REUSE_ENABLE=true), and a final coverage job that downloads both jacoco .exec artifacts and rebuilds the aggregate report from dc3-coverage. - A new E2E workflow runs make test-e2e on develop/release/main pushes and on manual dispatch, with a 90 minute timeout that accommodates cold compose start-up plus the full critical path battery. - The existing CI workflow keeps its fast-fail compile job unchanged so PR feedback latency stays low; tests are now owned exclusively by the new Test workflow.
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: E2E
|
|
|
|
on:
|
|
push:
|
|
branches: [ develop, release, main ]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: e2e-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
e2e:
|
|
name: End-to-end suite
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: liberica
|
|
java-version: 21
|
|
cache: maven
|
|
cache-dependency-path: "**/pom.xml"
|
|
|
|
- name: Verify docker availability
|
|
run: |
|
|
docker version
|
|
docker info
|
|
|
|
- name: Run end-to-end suite
|
|
env:
|
|
TESTCONTAINERS_REUSE_ENABLE: "true"
|
|
run: |
|
|
set -euo pipefail
|
|
make test-e2e
|
|
|
|
- name: Upload failsafe reports
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: e2e-failsafe-reports
|
|
path: dc3-e2e/target/failsafe-reports/
|
|
if-no-files-found: ignore
|
|
retention-days: 14
|