Repository navigation
Merge pull request #3 from net0well/fase-3/persistencia #9
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 | |
| # The persistence tests start PostgreSQL 16 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 |