-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (28 loc) · 869 Bytes
/
pytest.yml
File metadata and controls
37 lines (28 loc) · 869 Bytes
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: Pytest
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
coverage:
timeout-minutes: 10
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Start containers
run: docker compose -f "local-dev/docker-compose.yml" up -d --build
- name: Build dev environment
run: docker exec cicada_dev make dev
- name: Run tests
run: docker exec cicada_dev make pytest
- name: Build coverage file
run: docker exec cicada_dev /bin/bash -c "source /opt/cicada/venv/bin/activate; pytest --cache-clear --cov=cicada --cov-fail-under=70" > pytest-coverage.txt
- name: Comment coverage
uses: coroo/pytest-coverage-commentator@v1.0.2
- name: Stop containers
if: always()
run: docker compose -f "local-dev/docker-compose.yml" down