Skip to content

Commit

Permalink
[GA] Skip coverage comment
Browse files Browse the repository at this point in the history
  • Loading branch information
iory committed Jan 12, 2024
1 parent 6e65fb3 commit f201e04
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
os: [self-hosted]
python-version: [3.8]
steps:
- name: Check if PR is from owner's repository
id: check-owner
run: |
if [[ "${{ github.actor }}" == "owner_username" ]]; then
echo "::set-output name=is_owner::true"
else
echo "::set-output name=is_owner::false"
fi
- uses: actions/checkout@v3
- name: Set up Python for Self-Hosted Linux arm64
uses: iory/[email protected]
Expand All @@ -58,7 +66,12 @@ jobs:
coverage erase
coverage run -m pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered tests
coverage xml
- name: Step for Owner's PR Only
if: steps.check-owner.outputs.is_owner == 'true'
run: |
echo "This step runs only for PRs from the owner's PR"
- name: Pytest coverage comment
if: steps.check-owner.outputs.is_owner == 'true'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-xml-coverage-path: ./coverage.xml
Expand Down

0 comments on commit f201e04

Please sign in to comment.