Switch license from GPL-2.0+ to Apache-2.0 #875
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": | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - repomatic/** | |
| - tests/** | |
| - pyproject.toml | |
| - uv.lock | |
| - .github/workflows/tests.yaml | |
| pull_request: | |
| branches-ignore: | |
| - prepare-release | |
| paths: | |
| - repomatic/** | |
| - tests/** | |
| - pyproject.toml | |
| - uv.lock | |
| - .github/workflows/tests.yaml | |
| schedule: | |
| # Run tests monthly to catch regressions from dependency or environment changes. | |
| - cron: "17 9 1 * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ !startsWith(github.event.head_commit.message, '[changelog] Release') }} | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Available OS: https://github.com/actions/runner-images#available-images | |
| os: | |
| - ubuntu-24.04-arm # arm64 | |
| - ubuntu-slim # x86 | |
| - ubuntu-24.04 # x86 | |
| - ubuntu-22.04-arm # arm64 | |
| - ubuntu-22.04 # x86 | |
| - macos-26 # arm64 | |
| - macos-15 # arm64 | |
| - macos-15-intel # x86 | |
| - macos-14 # arm64 | |
| - windows-11-arm # arm64 | |
| - windows-2025 # x86 | |
| - windows-2022 # x86 | |
| python-version: | |
| - "3.10" | |
| # Ignore intermediate versions to reduce CI load. | |
| # - "3.11" | |
| # - "3.12" | |
| # - "3.13" | |
| - "3.14" | |
| - "3.14t" | |
| - "3.15" | |
| - "3.15t" | |
| include: | |
| # Default all jobs as stable, unless marked otherwise below. | |
| - state: stable | |
| name: "${{ matrix.state == 'stable' && '✅' || '⁉️' }} ${{ matrix.os }} / py${{ matrix.python-version }}" | |
| runs-on: ${{ matrix.os }} | |
| # We keep going when a job flagged as not stable fails. | |
| continue-on-error: ${{ matrix.state == 'unstable' }} | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: astral-sh/setup-uv@v7.3.0 | |
| - name: Install Python ${{ matrix.python-version }} | |
| # If UV cannot find the requested Python version, it exits with code 2, which let the job pass unnoticed on | |
| # Windows. So we force the shell to bash, even on Windows, and "set -e" to ensure any error in the install | |
| # process is caught and fails the job. It works because Windows runners too Git Bash available). | |
| shell: bash | |
| run: | | |
| set -e | |
| uv --no-progress venv --python ${{ matrix.python-version }} | |
| - name: Install project | |
| # Install all extras, so we can check any incompatibility. | |
| run: | | |
| uv --no-progress sync --frozen --all-extras --group test --group docs | |
| - name: Run local CLI | |
| run: | | |
| uv run -- extra-platforms | |
| - name: Run CLI from module | |
| run: | | |
| uv run -m extra_platforms | |
| uv run python -m extra_platforms | |
| - name: Unittests | |
| env: | |
| # Used by github_runner_os() in tests/test_detection.py to extract the GitHub runner image ID. | |
| EXTRA_PLATFORMS_TEST_MATRIX: ${{ toJson(matrix) }} | |
| run: | | |
| uv --no-progress run --frozen -- pytest | |
| - name: Codecov - coverage | |
| uses: codecov/codecov-action@v5.5.2 | |
| with: | |
| report_type: coverage | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Codecov - test results | |
| uses: codecov/codecov-action@v5.5.2 | |
| with: | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| test-package-install: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-24.04-arm # arm64 | |
| - ubuntu-slim # x86 | |
| - ubuntu-24.04 # x86 | |
| - ubuntu-22.04-arm # arm64 | |
| - ubuntu-22.04 # x86 | |
| - macos-26 # arm64 | |
| - macos-15 # arm64 | |
| - macos-15-intel # x86 | |
| - macos-14 # arm64 | |
| - windows-11-arm # arm64 | |
| - windows-2025 # x86 | |
| - windows-2022 # x86 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: astral-sh/setup-uv@v7.3.0 | |
| with: | |
| # windows-2025 runners have only Python 3.9 installed. | |
| python-version: ${{ matrix.os == 'windows-2025' && '3.10' || ''}} | |
| # Run stable CLI. | |
| - run: uvx extra-platforms | |
| - run: uvx --from extra-platforms -- extra-platforms | |
| - run: uv run --with extra-platforms -- extra-platforms | |
| # Run dev CLI. | |
| - run: uvx --from git+https://github.com/kdeldycke/extra-platforms -- extra-platforms | |
| - run: uv run --with git+https://github.com/kdeldycke/extra-platforms -- extra-platforms |