Skip to content

Commit 5f10a1b

Browse files
Refactor CI workflow for integration tests
Updated concurrency group and conditions for running tests. Changed checkout action version and modified test run command to include verbose output. Signed-off-by: Vinay Singh <vinay@verid.id>
1 parent 84e31ca commit 5f10a1b

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/scenario-integration-tests.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ permissions:
1515
checks: write
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
19-
cancel-in-progress: true
18+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.run_id }}
19+
cancel-in-progress: false
2020

2121
defaults:
2222
run:
@@ -25,11 +25,11 @@ defaults:
2525
jobs:
2626
test:
2727
runs-on: ubuntu-latest
28-
# Run on openwallet-foundation and non-draft PRs or on non-PR events
29-
if: (github.repository == 'openwallet-foundation/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
28+
# Run on openwallet-foundation, VeriDID fork, and non-draft PRs or on non-PR events
29+
if: (github.repository == 'openwallet-foundation/acapy' || github.repository == 'VeriDID/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
3030
steps:
3131
- name: checkout-acapy
32-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
32+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3333
with:
3434
fetch-depth: 0
3535
- name: Check changed files
@@ -38,9 +38,9 @@ jobs:
3838
with:
3939
files_yaml: |
4040
scenarios: "scenarios/**/*"
41-
src:
41+
src:
4242
- acapy_agent/**/*
43-
- poetry.lock
43+
- poetry.lock
4444
- pyproject.toml
4545
- name: Check if scenarios or src files changed
4646
id: check-if-scenarios-or-src-changed
@@ -60,9 +60,23 @@ jobs:
6060
cache: "poetry"
6161
- name: Run Scenario Tests
6262
if: steps.check-if-scenarios-or-src-changed.outputs.run_tests != 'false'
63+
id: test-run
64+
continue-on-error: true
6365
run: |
6466
# Build the docker image for testing
6567
docker build -t acapy-test -f docker/Dockerfile.run .
6668
cd scenarios
6769
poetry install --no-root
68-
poetry run pytest -m examples
70+
poetry run pytest -m examples -v --tb=short
71+
- name: Show kanon container logs on failure
72+
if: steps.test-run.outcome == 'failure'
73+
run: |
74+
echo "=== kanon-postgres container logs ==="
75+
cd scenarios/examples/kanon_issuance_and_presentation
76+
docker compose logs kanon-postgres --tail=2000 || true
77+
echo ""
78+
echo "=== All container logs ==="
79+
docker compose logs --tail=500 || true
80+
- name: Fail if tests failed
81+
if: steps.test-run.outcome == 'failure'
82+
run: exit 1

0 commit comments

Comments
 (0)