Repository navigation
Merge pull request #6 from net0well/fase-6/painel-vue #17
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 | |
| # The Release build embeds the Vue panel (npm ci + npm run build in panel/; D-155). | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: panel/.nvmrc | |
| cache: npm | |
| cache-dependency-path: panel/package-lock.json | |
| - 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 panel E2E tests drive Chromium with Playwright (spec 008; D-149, D-156). | |
| - name: Install Chromium | |
| if: runner.os == 'Linux' | |
| run: pwsh tests/PythonScriptRunner.Panel.E2E.Tests/bin/Release/net10.0/playwright.ps1 install --with-deps chromium | |
| # The persistence, queue, worker, dashboard and panel 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: Upload Playwright traces | |
| if: failure() && runner.os == 'Linux' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-traces | |
| path: tests/PythonScriptRunner.Panel.E2E.Tests/bin/Release/net10.0/TestResults/traces/ | |
| if-no-files-found: ignore | |
| - 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 | |
| panel: | |
| name: Panel (Vue) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: panel | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: panel/.nvmrc | |
| cache: npm | |
| cache-dependency-path: panel/package-lock.json | |
| - name: Install | |
| run: npm ci --no-audit --no-fund | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type check | |
| run: npm run typecheck | |
| # The TypeScript types are generated from the versioned OpenAPI snapshot of the Dashboard tests (D-137). | |
| - name: API types up to date | |
| run: npm run api:check | |
| - name: Test | |
| run: npm test | |
| # vue-tsc + vite build + the initial bundle budget (≤ 500 KB gzip; spec 008). | |
| - name: Build | |
| run: npm run build | |
| 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 |