GHA: Use python-pillow/Pillow's Codecov token for own builds

This commit is contained in:
Hugo 2019-12-12 00:07:00 +02:00
parent 52113a82b0
commit 77ad951d96
4 changed files with 37 additions and 11 deletions

View File

@ -6,8 +6,6 @@ codecov:
# https://docs.codecov.io/docs/comparing-commits
allow_coverage_offsets: true
token: 6dafc396-e7f5-4221-a38a-8b07a49fbdae
comment: off
# Matches 'omit:' in .coveragerc

18
.github/workflows/codecov-upstream.yml vendored Normal file
View File

@ -0,0 +1,18 @@
# Documentation: https://docs.codecov.io/docs/codecov-yaml
codecov:
# Avoid "Missing base report" due to committing CHANGES.rst with "[CI skip]"
# https://github.com/codecov/support/issues/363
# https://docs.codecov.io/v4.3.6/docs/comparing-commits
allow_coverage_offsets: true
token: 6dafc396-e7f5-4221-a38a-8b07a49fbdae
comment: off
# Matches 'omit:' in .coveragerc
ignore:
- "Tests/32bit_segfault_check.py"
- "Tests/bench_cffi_access.py"
- "Tests/check_*.py"
- "Tests/createfontdatachunk.py"

View File

@ -366,10 +366,16 @@ jobs:
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ runner.os }} Python ${{ matrix.python-version }}
run: |
if [ "$GITHUB_REPOSITORY" == "python-pillow/Pillow" ]; then
echo "CI on python-pillow/Pillow, copy CodeCov settings"
cp .github/workflows/codecov-upstream.yml .codecov.yml
fi
curl -s https://codecov.io/bash | bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_NAME: ${{ runner.os }} Python ${{ matrix.python-version }}
shell: bash
- name: Build wheel
id: wheel

View File

@ -95,12 +95,16 @@ jobs:
.travis/after_success.sh
env:
MATRIX_OS: ${{ matrix.os }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
run: |
if [ "$GITHUB_REPOSITORY" == "python-pillow/Pillow" ]; then
echo "CI on python-pillow/Pillow, copy CodeCov settings"
cp .github/workflows/codecov-upstream.yml .codecov.yml
fi
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }}