Skip to content

Commit

Permalink
Only pin codecov-action for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 4, 2024
1 parent dba7dea commit c2b9b39
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,22 @@ jobs:
run: |
bash.exe .ci/after_success.sh
- name: Upload coverage
- name: Upload coverage v3
if: github.event_name == 'pull_request'
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: GHA_Cygwin
name: Cygwin Python 3.${{ matrix.python-minor-version }}

- name: Upload coverage
if: github.event_name != 'pull_request'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: GHA_Cygwin
name: Cygwin Python 3.${{ matrix.python-minor-version }}

success:
permissions:
contents: none
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,21 @@ jobs:
env:
MATRIX_DOCKER: ${{ matrix.docker }}

- name: Upload coverage
- name: Upload coverage v3
if: github.event_name == 'pull_request'
uses: codecov/[email protected]
with:
flags: GHA_Docker
name: ${{ matrix.docker }}
gcov: true

- name: Upload coverage
if: github.event_name != 'pull_request'
uses: codecov/codecov-action@v4
with:
flags: GHA_Docker
name: ${{ matrix.docker }}

success:
permissions:
contents: none
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,18 @@ jobs:
python3 -c "from PIL import Image"
python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
- name: Upload coverage
- name: Upload coverage v3
if: github.event_name == 'pull_request'
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: GHA_Windows
name: "MSYS2 MinGW"

- name: Upload coverage
if: github.event_name != 'pull_request'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: GHA_Windows
name: "MSYS2 MinGW"
11 changes: 10 additions & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,22 @@ jobs:
.ci/after_success.sh
shell: pwsh

- name: Upload coverage
- name: Upload coverage v3
if: github.event_name == 'pull_request'
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: GHA_Windows
name: ${{ runner.os }} Python ${{ matrix.python-version }}

- name: Upload coverage
if: github.event_name != 'pull_request'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: GHA_Windows
name: ${{ runner.os }} Python ${{ matrix.python-version }}

success:
permissions:
contents: none
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,21 @@ jobs:
run: |
.ci/after_success.sh
- name: Upload coverage
- name: Upload coverage v3
if: github.event_name == 'pull_request'
uses: codecov/[email protected]
with:
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
gcov: true

- name: Upload coverage
if: github.event_name != 'pull_request'
uses: codecov/codecov-action@v4
with:
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

success:
permissions:
contents: none
Expand Down

0 comments on commit c2b9b39

Please sign in to comment.