Ashwin/contrib #10
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| name: "Lint" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run ruff check | |
| run: uvx ruff@latest check --output-format=github . | |
| - name: Run ruff format | |
| run: uvx ruff@latest format --check . | |
| test-generic: | |
| name: "Tests · Generic" | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run generic tests | |
| run: | | |
| uv run pytest tests/ -v \ | |
| -m "not postgresql and not oracle and not mssql" \ | |
| --strict-markers --maxfail=100 \ | |
| --cov=taskiq_sqlalchemy \ | |
| --cov-report=xml:coverage-generic.xml | |
| # - name: Upload coverage | |
| # uses: codecov/codecov-action@v5 | |
| # with: | |
| # files: coverage-generic.xml | |
| # flags: generic | |
| # fail_ci_if_error: false | |
| test-postgresql: | |
| name: "Tests · PostgreSQL" | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| services: | |
| postgres: | |
| image: postgres:10 | |
| env: | |
| POSTGRES_USER: taskiq_user | |
| POSTGRES_PASSWORD: gOxN5hbl7geTwgvS | |
| POSTGRES_DB: taskiq | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U taskiq_user -d taskiq" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run postgresql tests | |
| run: | | |
| uv run pytest tests/ -v \ | |
| -m "postgresql" \ | |
| --strict-markers --maxfail=100 \ | |
| --cov=taskiq_sqlalchemy \ | |
| --cov-report=xml:coverage-postgresql.xml | |
| # - name: Upload coverage | |
| # uses: codecov/codecov-action@v5 | |
| # with: | |
| # files: coverage-postgresql.xml | |
| # flags: postgresql | |
| # fail_ci_if_error: false | |
| test-oracle: | |
| name: "Tests · Oracle" | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| services: | |
| oracle: | |
| image: gvenzl/oracle-xe:21 | |
| env: | |
| ORACLE_DATABASE: taskiq | |
| ORACLE_RANDOM_PASSWORD: "yes" | |
| ports: | |
| - 1521:1521 | |
| volumes: | |
| - ${{ github.workspace }}/docker/initdb.d/01-oracle-grants.sql:/container-entrypoint-initdb.d/01-oracle-grants.sql:ro | |
| options: >- | |
| --health-cmd "healthcheck.sh" | |
| --health-interval 20s | |
| --health-timeout 5s | |
| --health-retries 20 | |
| --health-start-period 1m | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run oracle tests | |
| run: | | |
| uv run pytest tests/ -v \ | |
| -m "oracle" \ | |
| --strict-markers --maxfail=100 \ | |
| --cov=taskiq_sqlalchemy \ | |
| --cov-report=xml:coverage-oracle.xml | |
| # - name: Upload coverage | |
| # uses: codecov/codecov-action@v5 | |
| # with: | |
| # files: coverage-oracle.xml | |
| # flags: oracle | |
| # fail_ci_if_error: false |