diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e38d5d5 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/Makefile b/Makefile index e973ca0..f2dc407 100644 --- a/Makefile +++ b/Makefile @@ -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