Skip to content

Commit d29c62e

Browse files
authored
Merge pull request #184 from georgian-io/pytest-git-action
pytest CI github action
2 parents e87ca03 + 54f9333 commit d29c62e

File tree

4 files changed

+1084
-727
lines changed

4 files changed

+1084
-727
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: pytest CI
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: poetry run pytest --cov=./ --cov-report=term
37+
- name: Check Coverage
38+
run: poetry run coverage report --fail-under=80

0 commit comments

Comments
 (0)