Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: parallelize the coverage calculation #8

Merged
merged 2 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
open-pull-requests-limit: 5
schedule:
interval: "daily"

- package-ecosystem: github-actions
directory: "/"
open-pull-requests-limit: 5
target-branch: main
schedule:
interval: weekly
36 changes: 30 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,39 @@ jobs:
python3 -mpip install -U pip poetry
poetry install

- name: Run tests (with coverage)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python_version == '3.10' }}
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run coverage run tests.py
poetry run coveralls --service=github

- name: Run tests (without coverage)
if: ${{ matrix.os != 'ubuntu-latest' || matrix.python_version != '3.10' }}
- name: Analyze coverage
run: |
make tests
poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "Py${{ matrix.python_version }}_${{ matrix.os }}"

coverage:
name: Push coverage report
needs: doc-tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Prepare Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install dependencies
run: |
pip install -U pip poetry
poetry install

- name: Upload coverage report
run: |
poetry run coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}