Skip to content

Commit

Permalink
Merge pull request #40 from radarhere/gha-codecov-bash
Browse files Browse the repository at this point in the history
Keep codecov-action
  • Loading branch information
hugovk authored Dec 24, 2019
2 parents 1e5c256 + 22ac95a commit fe57b98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,19 +364,16 @@ jobs:
name: errors
path: Tests/errors

- name: Prepare coverage token
if: success() && github.repository == 'python-pillow/Pillow'
run: cp .github/codecov-upstream.yml .codecov.yml

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

- name: Build wheel
id: wheel
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ jobs:
MATRIX_OS: ${{ matrix.os }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Prepare coverage token
if: success() && github.repository == 'python-pillow/Pillow'
run: cp .github/codecov-upstream.yml .codecov.yml

- name: Upload coverage
if: success()
run: |
if [ "$GITHUB_REPOSITORY" == "python-pillow/Pillow" ]; then
echo "CI on python-pillow/Pillow, copy CodeCov settings"
cp .github/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 }}
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

0 comments on commit fe57b98

Please sign in to comment.