ci: Move to the codecov github action

The pypi package was suddenly removed. Not the most
confidence-inspiring deprecation/migration:

https://about.codecov.io/blog/message-regarding-the-pypi-package/
pull/11749/head
Nirbheek Chauhan 2 years ago committed by Nirbheek Chauhan
parent 5eb55075ba
commit c0c9f755a4
  1. 14
      .github/workflows/cygwin.yml
  2. 26
      .github/workflows/macos.yml
  3. 12
      .github/workflows/msys2.yml
  4. 13
      .github/workflows/nonnative.yml
  5. 21
      .github/workflows/os_comp.yml
  6. 26
      .github/workflows/unusedargs_missingreturn.yml
  7. 1
      ci/ciimage/common.sh
  8. 3
      ci/combine_cov.sh

@ -76,7 +76,7 @@ jobs:
- name: Run pip
run: |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32
python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage codecov
python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
- uses: actions/cache/save@v3
@ -102,8 +102,16 @@ jobs:
# test log should be saved on failure
if: ${{ !cancelled() }}
- name: Upload coverage report
- name: Aggregate coverage reports
run: |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32
./ci/upload_cov.sh "${{ matrix.NAME }}"
./ci/combine_cov.sh
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "${{ matrix.NAME }}"
fail_ci_if_error: true
verbose: true

@ -33,7 +33,7 @@ jobs:
python-version: '3.x'
- run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist pytest-subtests jsonschema coverage codecov
python -m pip install pytest pytest-xdist pytest-subtests jsonschema coverage
- run: brew install pkg-config ninja llvm qt@5
- env:
CPPFLAGS: "-I/usr/local/include"
@ -46,8 +46,17 @@ jobs:
export PATH="$HOME/tools:/usr/local/opt/qt@5/bin:$PATH:$(brew --prefix llvm)/bin"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH"
./tools/run_with_cov.py ./run_unittests.py
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "appleclang [unit tests]"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "appleclang [unit tests]"
fail_ci_if_error: true
verbose: true
project-tests-appleclang:
@ -81,7 +90,7 @@ jobs:
- run: |
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install cython coverage codecov
python3 -m pip install cython coverage
- env:
CPPFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
@ -94,8 +103,17 @@ jobs:
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH"
export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"
./tools/run_with_cov.py ./run_project_tests.py --backend=ninja
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "appleclang [project tests; unity=${{ matrix.unity }}]"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "appleclang [project tests; unity=${{ matrix.unity }}]"
fail_ci_if_error: true
verbose: true
Qt4macos:
runs-on: macos-latest

@ -87,7 +87,7 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage codecov
python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage
- name: Install pypy3 on x86_64
run: |
@ -129,5 +129,13 @@ jobs:
name: ${{ matrix.NAME }}
path: meson-test-run.*
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "${{ matrix.NAME }}"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "${{ matrix.NAME }}"
fail_ci_if_error: true
verbose: true

@ -36,9 +36,18 @@ jobs:
- run: |
apt-get -y purge clang gcc gdc
apt-get -y autoremove
python3 -m pip install coverage codecov
python3 -m pip install coverage
- uses: actions/checkout@v3
- name: Run tests
run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS --cross ubuntu-armhf.json --cross-only'
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "Ubuntu nonnative"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "Ubuntu nonnative"
fail_ci_if_error: true
verbose: true

@ -53,8 +53,17 @@ jobs:
# They are defined in the `env` section in each image.json. CI_ARGS should be set
# via the `args` array ub the image.json
run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS'
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "OS Comp [${{ matrix.cfg.name }}]"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "OS Comp [${{ matrix.cfg.name }}]"
fail_ci_if_error: true
verbose: true
pypy:
name: 'Arch / PyPy'
@ -145,5 +154,13 @@ jobs:
./tools/run_with_cov.py ./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]"
fail_ci_if_error: true
verbose: true

@ -52,12 +52,21 @@ jobs:
run: |
sudo apt update -yq
sudo apt install -yq --no-install-recommends g++ gfortran ninja-build gobjc gobjc++
python -m pip install coverage codecov
python -m pip install coverage
- run: ./tools/run_with_cov.py run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++"
env:
MESON_CI_JOBNAME: linux-ubuntu-gcc-werror
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
- name: Upload coverage report
run: ./ci/upload_cov.sh "UnusedMissingReturn"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "UnusedMissingReturn"
fail_ci_if_error: true
verbose: true
windows:
runs-on: windows-latest
@ -67,7 +76,7 @@ jobs:
with:
python-version: '3.x'
- run: pip install ninja pefile coverage codecov
- run: pip install ninja pefile coverage
- run: python ./tools/run_with_cov.py run_project_tests.py --only platform-windows
env:
@ -76,5 +85,14 @@ jobs:
FC: gfortran
MESON_CI_JOBNAME: msys2-gcc-werror
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
- name: Upload coverage report
run: ./ci/upload_cov.sh "UnusedMissingReturn Windows"
uses: codecov/codecov-action@v3
with:
files: .coverage/coverage.xml
name: "UnusedMissingReturn Windows"
fail_ci_if_error: true
verbose: true

@ -15,7 +15,6 @@ base_python_pkgs=(
pytest-xdist
pytest-subtests
coverage
codecov
jsonschema
)

@ -8,6 +8,3 @@ coverage xml
echo "Printing report"
coverage report
echo "Uploading to codecov..."
codecov -f .coverage/coverage.xml -n "$1"
Loading…
Cancel
Save