Fix the PyPI publishing authentication from GitHub Actions #53
Workflow file for this run
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: | |
| - main | |
| - release/** | |
| workflow_dispatch: {} | |
| jobs: | |
| linters: | |
| name: Linting and static analysis | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - run: pip install --group dev --group lint -e . | |
| - run: pre-commit run --all-files | |
| - run: mypy looptime --strict | |
| unit-tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.10", "3.11", "3.12", "3.13" ] | |
| include: | |
| - python-version: "3.14" | |
| - python-version: "3.14" | |
| install-extras: "pytest-asyncio<1.0.0" | |
| name: Python ${{ matrix.python-version }}${{ matrix.install-extras && ', ' || '' }}${{ matrix.install-extras }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install --group dev -e . | |
| - run: pip install "${{ matrix.install-extras }}" | |
| if: ${{ matrix.install-extras }} | |
| - run: pytest --color=yes --cov=looptime --cov-branch | |
| - name: Publish coverage to Coveralls.io | |
| if: success() | |
| run: coveralls --service=github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.github_token }} | |
| continue-on-error: true | |
| - name: Publish coverage to CodeCov.io | |
| uses: codecov/codecov-action@v3 | |
| if: success() | |
| env: | |
| PYTHON: ${{ matrix.python-version }} | |
| with: | |
| flags: unit | |
| env_vars: PYTHON | |
| continue-on-error: true | |
| # No coverage: PyPy performs extremely poorly with tracing/coverage. | |
| pypy-tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "pypy-3.10", "pypy-3.11" ] | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install --group dev -e . | |
| - run: pytest --color=yes --no-cov | |
| coveralls-finish: | |
| name: Finalize coveralls.io | |
| needs: [unit-tests] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/setup-python@v6 | |
| - run: pip install coveralls | |
| - run: coveralls --service=github --finish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.github_token }} | |
| continue-on-error: true |