ci: automate releases on merge to main (#32) #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |