upload code coverage on pull_request_target

This commit is contained in:
Sam Schott 2021-02-26 22:14:48 +00:00
parent 35354d67f9
commit d16863c660

View File

@ -118,8 +118,9 @@ jobs:
run: |
pytest -v --reruns 5 --cov=maestral --cov-report=xml tests/linked
- name: Upload coverage to Codecov
- name: Upload Code Coverage
uses: codecov/codecov-action@v1
if: github.event_name != 'pull_request_target'
with:
file: ./coverage.xml
flags: pytest
@ -129,3 +130,18 @@ jobs:
OS: ${{ matrix.platform }}
PYTHON: ${{ matrix.python-version }}
TYPE: 'linked'
- name: Upload Code Coverage for PR-target
uses: codecov/codecov-action@v1
if: github.event_name == 'pull_request_target'
with:
override_pr: ${{ github.event.number }}
override_sha: ${{ github.event.pull_request.head.sha }}
file: ./coverage.xml
flags: pytest
env_vars: OS,PYTHON,TYPE
name: pytests
env:
OS: ${{ matrix.platform }}
PYTHON: ${{ matrix.python-version }}
TYPE: 'linked'