Improve contributor workflow, tooling, and release guidance #336
Workflow file for this run
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: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - release | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-sqlite: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| database: ["sqlite"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up uv | |
| id: setup-uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| enable-cache: true | |
| - name: Sync dependencies | |
| id: sync-dependencies | |
| run: uv sync --locked | |
| - name: Test with tox | |
| id: test-with-tox | |
| run: uv run tox | |
| env: | |
| DATABASE: ${{ matrix.database }} | |
| test-postgres: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.14"] | |
| database: ["postgres"] | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up uv | |
| id: setup-uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| enable-cache: true | |
| - name: Sync dependencies | |
| id: sync-dependencies | |
| run: uv sync --locked | |
| - name: Test with tox | |
| id: test-with-tox | |
| run: uv run tox | |
| env: | |
| DB_NAME: postgres | |
| DB_USER: postgres | |
| DB_PASSWORD: postgres | |
| DB_HOST: localhost | |
| DB_PORT: 5432 | |
| DATABASE: ${{ matrix.database }} | |
| test-mysql: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.14"] | |
| database: ["mysql"] | |
| services: | |
| mariadb: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: mysql | |
| options: >- | |
| --health-cmd "mysqladmin ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 3306:3306 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up uv | |
| id: setup-uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| enable-cache: true | |
| - name: Sync dependencies | |
| id: sync-dependencies | |
| run: uv sync --locked | |
| - name: Test with tox | |
| id: test-with-tox | |
| run: uv run tox | |
| env: | |
| DB_NAME: mysql | |
| DB_USER: root | |
| DB_PASSWORD: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DATABASE: ${{ matrix.database }} |