Skip to content

ci: automate releases on merge to main (#32) #3

ci: automate releases on merge to main (#32)

ci: automate releases on merge to main (#32) #3

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Unit tests (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Floor and a current version; bump as supported range changes.
python-version: ["3.9", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package + dev deps
# setup-uv already created .venv and set VIRTUAL_ENV.
run: uv pip install -e ".[dev]"
- name: Run unit tests
# test_acceptance.py and test_query.py require a live Lightdash
# instance + credentials, so they are excluded from CI.
run: |
uv run pytest tests/ \
--ignore=tests/test_acceptance.py \
--ignore=tests/test_query.py \
-q