Skip to content

Commit 940bd2b

Browse files
committed
pytest CI github action
1 parent e87ca03 commit 940bd2b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PyPI CD
2+
on: pull_request
3+
jobs:
4+
pytest:
5+
name: Run pytest and check min coverage threshold (80%)
6+
runs-on: ubuntu-latest
7+
steps:
8+
# ----------------
9+
# Set Up
10+
# ----------------
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.11"
19+
- name: Install poetry
20+
uses: snok/install-poetry@v1
21+
with:
22+
version: 1.5.1
23+
virtualenvs-create: true
24+
virtualenvs-in-project: true
25+
installer-parallel: true
26+
# ----------------
27+
# Install Deps
28+
# ----------------
29+
- name: Install Dependencies
30+
run: |
31+
poetry install --no-interaction --no-root
32+
# ----------------
33+
# Run Test
34+
# ----------------
35+
- name: Run pytest
36+
run: pytest --cov=./ --cov-report=term
37+
- name: Check Coverage
38+
uses: coverage report --fail-under=80

0 commit comments

Comments
 (0)