diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2809f54 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +# This workflow will install Python dependencies, run tests with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + make run-ci diff --git a/Makefile b/Makefile index c59d340..76231cc 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +SHELL := /bin/bash + .PHONY: setup setup: pip install uv @@ -7,3 +9,12 @@ setup: .PHONY: test test: pytest --cov=web_watchr --cov-report term-missing + +.PHONY: setup-ci +run-ci: + pip install --upgrade pip + pip install uv + uv venv env + source env/bin/activate + uv pip install -e ".[dev]" + pytest --cov=web_watchr --cov-report term-missing