fix: try to make coveralls installed only in github ci env [3] #379
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
| --- | |
| # .. seealso:: https://github.com/ymyzk/tox-gh-actions | |
| # | |
| name: Tests | |
| # yamllint disable-line rule:truthy | |
| on: | |
| - push | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| max-parallel: 5 | |
| matrix: | |
| platform: | |
| - ubuntu-latest | |
| - windows-latest | |
| # - macos-latest | |
| python-version: | |
| - 3.9 | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| # https://github.com/actions/setup-python | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # https://github.com/astral-sh/setup-uv | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: pin python version | |
| run: uv python pin ${{ matrix.python-version }} | |
| - name: Install tox and its plugins | |
| run: uv tool install tox --with tox-uv --with tox-gh-actions | |
| - name: Install some additional dependencies | |
| run: uv pip install --system coveralls | |
| - name: Test with tox | |
| run: tox | |
| env: | |
| PLATFORM: ${{ matrix.platform }} | |
| - uses: codecov/codecov-action@v4 | |
| # .. seealso:: https://github.com/marketplace/actions/codecov#usage | |
| # .. seealso:: https://docs.codecov.com/reference/overview | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # files: ./coverage1.xml,./coverage2.xml # optional | |
| # flags: unittests # optional | |
| # name: codecov-umbrella # optional | |
| #fail_ci_if_error: true # optional (default = false) | |
| verbose: true # optional (default = false) |