-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (36 loc) · 1.18 KB
/
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
name: Testing iwf-python-sdk
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Run linters
uses: pre-commit/[email protected]
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up iWF environment"
run: docker compose -f iwf/tests/iwf-service-env/docker-compose.yml up -d
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Run pytest check # sleep 30s to wait for the server to be ready
run: echo "[run]">>.coveragerc && echo "omit = iwf/iwf_api/">>.coveragerc && sleep 30 && poetry run pytest -vv --cov-config=.coveragerc --cov="iwf/" .
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2