Upload to coveralls.io in CI (#2) #9
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: | |
| push: | |
| branches: [ master, main ] | |
| tags: [ "**" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| jobs: | |
| Check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install -e . | |
| pip3 install -e dev | |
| - name: Install coveralls | |
| run: pip3 install --upgrade coveralls | |
| if: github.event.repository.fork == false | |
| # NOTE (mristin): | |
| # We introduce this check as a fast-fail. | |
| - name: Check help in readme | |
| run: python3 dev/continuous_integration/precommit.py --select check-help-in-readme | |
| # NOTE (mristin): | |
| # We introduce this check as a fast-fail. | |
| - name: Check that __init__.py and pyproject.toml are consistent | |
| run: python3 dev/continuous_integration/precommit.py --select check-init-and-pyproject-consistent | |
| - name: Run precommit | |
| run: | | |
| python3 dev/continuous_integration/precommit.py --skip check-help-in-readme check-init-and-pyproject-consistent | |
| - name: Upload Coverage | |
| run: coveralls --service=github | |
| if: github.event.repository.fork == false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COVERALLS_FLAG_NAME: ${{ matrix.python-version }} | |
| COVERALLS_PARALLEL: true | |
| Finish-Coveralls: | |
| name: Finish Coveralls | |
| needs: Check | |
| runs-on: ubuntu-latest | |
| container: python:3-slim | |
| if: github.event.repository.fork == false | |
| steps: | |
| - name: Finish Coveralls | |
| run: | | |
| pip3 install --upgrade coveralls | |
| coveralls --finish --service=github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |