Skip to content

Commit

Permalink
fix make test target & add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikschubert committed Feb 1, 2024
1 parent e24b659 commit b57db31
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
paths-ignore:
- 'README.md'
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Run install
run: |
make install
- name: Run linting
run: |
make lint
- name: Run tests
run: |
make test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lint:
$(VENV_RUN); python -m ruff check --show-source . && python -m black --check .

test: venv
$(VENV_RUN); python -m pytest --cov $(ROOT_MODULE)
$(VENV_RUN); python -m pytest tests

test-coverage: venv
$(VENV_RUN); coverage run --source=$(ROOT_MODULE) -m pytest tests && coverage lcov -o .coverage.lcov
Expand Down

0 comments on commit b57db31

Please sign in to comment.