Repository navigation
Fase 4: fila RabbitMQ, worker e agendamento cron (specs 005, 006, WorkerHost) #11
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] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| dotnet: | |
| name: .NET (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| global-json-file: global.json | |
| # The integration tests build the psrunner wheel and create real Python environments with uv. | |
| - uses: astral-sh/setup-uv@v10.3.0 | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| # weasyprint (CS-2 fixture, html-para-pdf) renders with pango. | |
| - name: Install pango | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b fonts-dejavu-core | |
| # The persistence, queue and worker tests start PostgreSQL 16, RabbitMQ 3.13 and Mailpit with Testcontainers | |
| # (Docker); GitHub's Windows runners cannot run Linux containers, so Windows runs the Core tests only. | |
| - name: Test | |
| if: runner.os == 'Linux' | |
| run: dotnet test --no-build --configuration Release | |
| - name: Test (Core) | |
| if: runner.os == 'Windows' | |
| run: dotnet test --no-build --configuration Release --project tests/PythonScriptRunner.Core.Tests | |
| format: | |
| name: .NET format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| global-json-file: global.json | |
| - name: Verify formatting | |
| run: dotnet format --verify-no-changes | |
| python-sdk: | |
| name: psrunner (${{ matrix.os }}, Python ${{ matrix.python }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python: ['3.10', '3.11', '3.12', '3.13'] | |
| include: | |
| # Windows only on the default version to save Actions minutes. | |
| - os: windows-latest | |
| python: '3.12' | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: python/psrunner | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: astral-sh/setup-uv@v10.3.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install | |
| run: uv sync --locked | |
| - name: Lint | |
| run: | | |
| uv run ruff check src tests | |
| uv run ruff format --check src tests | |
| - name: Type check | |
| run: uv run mypy | |
| - name: Test | |
| run: uv run pytest |