-
Notifications
You must be signed in to change notification settings - Fork 314
103 lines (90 loc) · 3.79 KB
/
examples-cbdc.yml
File metadata and controls
103 lines (90 loc) · 3.79 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
name: CBDC Example CI
permissions:
contents: write # Required for test result publishing
checks: write # Required for test result reports
packages: write # Required for publishing to GitHub Container Registry
env:
NODEJS_VERSION: v22.18.0
on:
pull_request:
branches: [main, satp-dev, satp-stg]
push:
branches: [main, satp-dev, satp-stg]
jobs:
# Test execution jobs: run unit and integration tests in parallel
run-satp-tests-integration-cbdc:
runs-on: ubuntu-latest-16-cores
env:
FULL_BUILD_DISABLED: true
JEST_TEST_RUNNER_DISABLED: false
RUN_CODE_COVERAGE: "true"
# SATP specific configuration
SATP_ENABLE_CRASH_RECOVERY: false
SATP_LOG_LEVEL: DEBUG
SATP_ENABLE_LOCAL_REPOSITORY: true
SATP_ENABLE_REMOTE_REPOSITORY: false
steps:
- uses: actions/checkout@v4.1.7
- name: Use Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: v22.18.0
# Download build artifacts using reusable action
#- name: Download SATP build artifacts
# uses: ./.github/actions/satp-download-build-artifacts
# Download generated artifacts
#- name: Download generated artifacts
# uses: ./.github/actions/satp-download-generated-artifacts
- name: Install dependencies
run: yarn install
- run: ./tools/ci-env-clean-up.sh
- name: Configure and build all packages
run: yarn configure
- name: Run CBDC integration tests (with optional coverage)
run: |
set -euo pipefail
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
echo "Running CBDC integration tests with coverage"
yarn workspace @hyperledger/cactus-example-cbdc-bridging-backend test:integration --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-cbdc || true
else
echo "Running CBDC integration tests without coverage"
yarn workspace @hyperledger/cactus-example-cbdc-bridging-backend test:integration
fi
- name: Upload CBDC integration test report
if: always()
uses: actions/upload-artifact@v4
with:
name: cbdc-integration-junit-report-${{ github.job }}
path: examples/cactus-example-cbdc-bridging-backend/reports/junit/cbdc-bridging-tests-integration.xml
- name: Check for CBDC junit report
id: check_cbdc_junit
run: |
if [ -f examples/cactus-example-cbdc-bridging-backend/reports/junit/cbdc-bridging-tests-integration.xml ]; then
echo "found=true" >> "$GITHUB_OUTPUT"
else
echo "found=false" >> "$GITHUB_OUTPUT"
fi
- name: Report CBDC integration test results (annotate)
if: always() && steps.check_cbdc_junit.outputs.found == 'true'
uses: dorny/test-reporter@v1.9.1
with:
name: "CBDC Integration Tests"
path: examples/cactus-example-cbdc-bridging-backend/reports/junit/cbdc-bridging-tests-integration.xml
reporter: jest-junit
list-tests: failed
fail-on-error: true
- name: Check for CBDC integration coverage artifacts
id: check_cbdc_coverage
run: |
if [ -d packages/cactus-plugin-satp-hermes/code-coverage-ts ] || [ -f packages/cactus-plugin-satp-hermes/coverage/coverage-final.json ]; then
echo "found=true" >> "$GITHUB_OUTPUT"
else
echo "found=false" >> "$GITHUB_OUTPUT"
fi
- name: Upload CBDC integration coverage (if present)
if: always() && steps.check_cbdc_coverage.outputs.found == 'true'
uses: actions/upload-artifact@v4
with:
name: coverage-reports-satp-hermes-${{ github.job }}
path: |
packages/cactus-plugin-satp-hermes/code-coverage-ts/**/