forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (79 loc) · 3.85 KB
/
bdd-interop-tests.yml
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
name: BDD Interop Integration Tests
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:
branches:
- main
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
# Run on openwallet-foundation and non-draft PRs or on non-PR events
if: (github.repository == 'openwallet-foundation/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
outputs:
is_release: ${{ steps.check_if_release.outputs.is_release }}
steps:
- name: checkout-acapy
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check changed files
id: check-changed-files
uses: tj-actions/changed-files@v45
with:
files_yaml: |
src:
- acapy_agent/**/*
- poetry.lock
- pyproject.toml
- name: Check if src files changed
id: check-if-src-changed
run: |
if [ "${{ steps.check-changed-files.outputs.src_any_changed }}" != "true" ] && [ '${{ github.event_name }}' == 'pull_request' ]; then
echo "No src files changed..."
echo run_tests=false >> $GITHUB_OUTPUT
fi
- name: Check if PR is a release
if: steps.check-if-src-changed.outputs.run_tests != 'false'
uses: ./.github/actions/is-release
id: check_if_release
- name: Request GitHub API for PR data
if: steps.check-if-src-changed.outputs.run_tests != 'false'
uses: octokit/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: get_pr_data
with:
route: GET /repos/${{ github.event.repository.full_name }}/pulls/${{ github.event.number }}
- name: Prepare Interop Tests
if: steps.check-if-src-changed.outputs.run_tests != 'false'
run: |
# Get AATH
git clone https://github.com/openwallet-foundation/owl-agent-test-harness.git
# Change fork and branch for pull requests
if [ ${{ github.event_name }} == 'pull_request' ]; then
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}
sed -i 's|@git+https://github.com/openwallet-foundation/acapy@main|@git+${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}@${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}|g' ./owl-agent-test-harness/aries-backchannels/acapy/requirements-main.txt
fi
cat owl-agent-test-harness/aries-backchannels/acapy/requirements-main.txt
cd owl-agent-test-harness
./manage build -a acapy-main
- name: Run PR Interop Tests
if: (steps.check_if_release.outputs.is_release != 'true' && github.event_name == 'pull_request' && steps.check-if-src-changed.outputs.run_tests != 'false')
run: |
cd owl-agent-test-harness
NO_TTY=1 LEDGER_URL_CONFIG=http://test.bcovrin.vonx.io TAILS_SERVER_URL_CONFIG=https://tails.vonx.io ./manage run -d acapy-main -t @critical -t ~@wip -t ~@T004-RFC0211 -t ~@DidMethod_orb -t ~@Transport_NoHttpOutbound
- name: Run Release or Nightly Interop Tests
if: (steps.check_if_release.outputs.is_release == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' && steps.check-if-src-changed.outputs.run_tests != 'false')
run: |
cd owl-agent-test-harness
NO_TTY=1 LEDGER_URL_CONFIG=http://test.bcovrin.vonx.io TAILS_SERVER_URL_CONFIG=https://tails.vonx.io ./manage run -d acapy-main -t @AcceptanceTest -t ~@wip -t ~@T004-RFC0211 -t ~@DidMethod_orb -t ~@Transport_NoHttpOutbound