Skip to content

Commit 67aa02c

Browse files
authored
Add pre-commit and coverage to Github workflow (#33)
1 parent 865e69b commit 67aa02c

File tree

3 files changed

+37
-36
lines changed

3 files changed

+37
-36
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types:
8+
- opened
9+
- synchronize
10+
- closed
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install Dependencies
24+
run: |
25+
pip install -e .
26+
pip install -r requirements.txt
27+
pre-commit install
28+
29+
- name: Run Unit Tests
30+
run: coverage run -m pytest -s tests
31+
32+
- name: Test Coverage
33+
# TODO: Change this after finishing tests.
34+
run: coverage report --fail-under=94
35+
36+
- name: Run Pre-Commit Hooks
37+
run: pre-commit run --all-files

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

testing-requirements.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)