forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 2.1 KB
/
integration-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
name: acapy-integration-tests
on:
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
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false && github.repository == 'jamshale/aries-cloudagent-python') || (github.event_name != 'pull_request')
steps:
- name: checkout-acapy
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install poetry
run: pipx install poetry
id: setup-poetry
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Initialize Docker Compose
uses: isbang/[email protected]
- name: Request GitHub API for PR data
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: Run Integration tests
run: |
# Get Minimal Agent
git clone https://github.com/Indicio-tech/acapy-minimal-example.git
# Copy custom integration tests to acapy-minimal-example
cp -a integration-tests/examples/. acapy-minimal-example/examples
ls -a acapy-minimal-example
echo "***********************************"
ls -a acapy-minimal-example/examples
echo "***********************************"
# Build the docker image for testing
docker build -t acapy-test -f docker/Dockerfile.run .
cd acapy-minimal-example
# replace the image name in all docker-compose files to acapy-test
compose_files=$(find ./examples/ -name "docker-compose.yml")
for file in $compose_files; do
sed -i 's/image:.*/image: acapy-test/g' $file
done
poetry install
poetry run pytest -m examples