Skip to content

Commit

Permalink
Merge branch 'main' into 1712-on-hold-deprecate-use-of-v1-tasks-withi…
Browse files Browse the repository at this point in the history
…n-v2-workflows
  • Loading branch information
tcompa committed Sep 3, 2024
2 parents d9e97b4 + 8363c62 commit 6c88926
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@ jobs:
poetry install --with dev --without docs --no-interaction -E gunicorn $DB
- name: Test with pytest
env:
COVERAGE_FILE: coverage-data-v1-${{ matrix.python-version }}-${{ matrix.db }}
run: poetry run coverage run --concurrency=thread,greenlet,multiprocessing -m pytest --ignore tests/no_version --ignore tests/v2

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: ".coverage*"
include-hidden-files: true
name: coverage-data-v1-${{ matrix.python-version }}-${{ matrix.db }}
path: coverage-data-v1-${{ matrix.python-version }}-${{ matrix.db }}*

tests_v2:

Expand Down Expand Up @@ -149,14 +150,15 @@ jobs:
poetry install --with dev --without docs --no-interaction -E gunicorn $DB
- name: Test with pytest
env:
COVERAGE_FILE: coverage-data-v2-${{ matrix.python-version }}-${{ matrix.db }}
run: poetry run coverage run --concurrency=thread,greenlet,multiprocessing -m pytest tests/v2 tests/no_version --ignore tests/v1

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: ".coverage*"
include-hidden-files: true
name: coverage-data-v2-${{ matrix.python-version }}-${{ matrix.db }}
path: coverage-data-v2-${{ matrix.python-version }}-${{ matrix.db }}*


coverage:
Expand All @@ -181,16 +183,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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Benchmarks:
* Add `GET /auth/token/login/` to tested endpoints (\#1720).
* Testing:
* Update GitHub actions `upload-artifact` and `download-artifact` to `v4` (\#1725).

# 2.3.10

Expand Down

0 comments on commit 6c88926

Please sign in to comment.