forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.02 KB
/
tests.yml
File metadata and controls
37 lines (35 loc) · 1.02 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
name: Tests
on:
workflow_call:
inputs:
python-version:
required: true
type: string
os:
required: true
type: string
jobs:
tests:
name: Test Python ${{ inputs.python-version }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements*.txt'
- name: Install the project dependencies
run: |
pip install poetry
poetry install -E "askar bbs"
- name: Tests
run: |
poetry run pytest 2>&1 | tee pytest.log
PYTEST_EXIT_CODE=${PIPESTATUS[0]}
if grep -Eq "RuntimeWarning: coroutine .* was never awaited" pytest.log; then
echo "Failure: Detected unawaited coroutine warning in pytest output."
exit 1
fi
exit $PYTEST_EXIT_CODE