Skip to content

CP-49906 :CI: Merge pytest & Coveralls (1/2 of simplifying merges with master) #5774

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

Closed
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
38 changes: 26 additions & 12 deletions .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@ jobs:
env:
SKIP: no-commit-to-branch

- name: Run Pytest for python 2 and get code coverage for Codecov
- name: Run Pytest for python 3 and get code coverage
if: ${{ matrix.python-version == '2.7' }}
run: >
pip install enum future mock pytest-coverage pytest-mock &&
pytest
--cov=scripts scripts --cov-fail-under 45 -vv -rA
--cov=scripts --cov=ocaml/xcp-rrdd
scripts/ ocaml/xcp-rrdd -vv -rA
--junitxml=.git/pytest${{matrix.python-version}}.xml
--cov-report term-missing
--cov-report xml:.git/coverage${{matrix.python-version}}.xml
env:
PYTHONDEVMODE: yes

- name: Upload Python ${{matrix.python-version}} coverage report to Codecov
if: ${{ matrix.python-version != '2.7' }}
uses: codecov/codecov-action@v3
- name: Upload coverage report to Coveralls
uses: coverallsapp/github-action@v2
with:
directory: .git
files: coverage${{matrix.python-version}}.xml
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: python${{matrix.python-version}}
name: coverage${{matrix.python-version}}
verbose: true
format: cobertura
files: .git/coverage${{matrix.python-version}}.xml
flag-name: python${{matrix.python-version}}
parallel: true

- uses: dciborow/action-pylint@0.1.0
if: ${{ matrix.python-version != '2.7' }}
Expand All @@ -89,6 +89,20 @@ jobs:
github_token: ${{ secrets.github_token }}
continue-on-error: true

# For coverage of 2.7 and 3.11 we upload to Coveralls in parallel mode.
# To view the Coveralls results of the PR, click on the "Details" link to the right
# of the Coveralls Logo in the Checks section of the PR.
finish-parallel-coveralls-upload:
name: Finish coverage upload
needs: python-test # run after the python-test has completed uploading coverages
runs-on: ubuntu-latest
steps:
- name: Finish the parallel coverage upload to Coveralls
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
continue-on-error: true # Do not fail CI if this step fails

deprecation-test:
name: Deprecation tests
runs-on: ubuntu-22.04
Expand Down
Loading