Skip to content

Commit

Permalink
Merge branch 'main' into poetry-update
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Sep 3, 2024
2 parents 523ff7c + e05d850 commit 5935e53
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/ci_poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ jobs:
run: poetry install --with dev --without docs --no-interaction

- name: Test core library with pytest
env:
COVERAGE_FILE: coverage-data-core-${{ matrix.python-version }}
run: poetry run coverage run -m pytest tests --ignore tests/tasks --ignore tests/dev

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: ".coverage*"
name: coverage-data-core-${{ matrix.python-version }}
path: coverage-data-core-${{ matrix.python-version }}*

tests_tasks:
name: "Tasks, Python ${{ matrix.python-version }}"
Expand Down Expand Up @@ -96,13 +98,15 @@ jobs:
key: pooch-cache

- name: Test tasks with pytest
env:
COVERAGE_FILE: coverage-data-tasks-${{ matrix.python-version }}
run: poetry run coverage run -m pytest tests/dev tests/tasks -s --log-cli-level info

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: ".coverage*"
name: coverage-data-tasks-${{ matrix.python-version }}
path: coverage-data-tasks-${{ matrix.python-version }}*

coverage:
name: Coverage
Expand All @@ -119,16 +123,24 @@ jobs:
run: python -m pip install --upgrade coverage[toml]

- name: Download data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data
pattern: coverage-data-*
merge-multiple: true

- name: Combine coverage
# Combines all the downloaded coverage artifacts in a single `.coverage` file,
# which will then be used by `py-cov-action/python-coverage-comment-action`.
# We added this step to replace the variable `MERGE_COVERAGE_FILES: true`
# in the next step, which had started to raise errors
# (https://github.com/fractal-analytics-platform/fractal-server/pull/1725).
run: coverage combine coverage-data-*

- name: Add coverage comment to Pull Requests
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MERGE_COVERAGE_FILES: true
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 60
ANNOTATE_MISSING_LINES: true
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Use latest version of Zenodo tiny-ome-zarr dataset (\#817).
* Relax pip-version constraint in external-packages-manifest tests (\#825).
* Run pip-based CI also regularly and on-demand (\#829).
* Update GitHub actions for upload/download/coverage (\#832).
* Dependencies:
* Require `stackview<=0.9.0` (\#829).
* Documentation:
Expand Down

0 comments on commit 5935e53

Please sign in to comment.