-
Notifications
You must be signed in to change notification settings - Fork 515
61 lines (57 loc) · 2.05 KB
/
scenario-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: Scenario 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
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
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: |
scenarios: "scenarios/**/*"
src:
- aries_cloudagent/**/*
- poetry.lock
- name: Check if scenarios or src files changed
id: check-if-scenarios-or-src-changed
run: |
if [ "${{ steps.check-changed-files.outputs.scenarios_any_changed }}" != "true" ] && [ "${{ steps.check-changed-files.outputs.src_any_changed }}" != "true" ] && [ '${{ github.event_name }}' == 'pull_request' ]; then
echo "No scenarios or src files changed..."
echo run_tests=false >> $GITHUB_OUTPUT
fi
- name: Install poetry
if: steps.check-if-scenarios-or-src-changed.outputs.run_tests != 'false'
run: pipx install poetry
id: setup-poetry
- uses: actions/setup-python@v5
if: steps.check-if-scenarios-or-src-changed.outputs.run_tests != 'false'
with:
python-version: "3.12"
cache: "poetry"
- name: Run Scenario Tests
if: steps.check-if-scenarios-or-src-changed.outputs.run_tests != 'false'
run: |
# Build the docker image for testing
docker build -t acapy-test -f docker/Dockerfile.run .
cd scenarios
poetry install --no-root
poetry run pytest -m examples