diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1e43392 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-venv: + name: Python virtual environment + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Set up environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: | + source venv/bin/activate + python -m pip install --upgrade pip + pip install ./ + + - name: Run tests + run: | + source venv/bin/activate + python -m pytest tests/