1.1.5 bump version #12
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: | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| push: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| # - name: Run code formatting check | |
| # run: | | |
| # uv run ruff format --check . | |
| # - name: Run linting | |
| # run: | | |
| # uv run ruff check . | |
| - name: Run type checking | |
| run: | | |
| uv run mypy | |
| - name: Run tests | |
| run: | | |
| make test | |
| - name: Run test example | |
| run: | | |
| make test-example | |
| - name: Run test example parallel (xdist) | |
| run: | | |
| make test-example-parallel | |
| - name: Run integration tests | |
| run: | | |
| uv run python -m pytest tests/integration/ | |
| - name: Run typeguard | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| make typeguard | |
| publish-check: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Check if version exists on PyPI | |
| id: version_check | |
| run: | | |
| VERSION=$(uv version | awk '{print $2}') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| # Check if version already exists on PyPI | |
| HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/pytest-api-cov/$VERSION/json") | |
| if [ "$HTTP_CODE" = "200" ]; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| echo "Version $VERSION already published to PyPI" | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| echo "Version $VERSION not found on PyPI (HTTP $HTTP_CODE)" | |
| fi | |
| - name: Comment on publish workflow | |
| if: steps.version_check.outputs.exists == 'true' | |
| run: | | |
| echo "::warning::Version ${{ steps.version_check.outputs.version }} already exists on PyPI. Update version in pyproject.toml before publishing." | |