From f201e04d924d284d3f8d0de583ca8deaa617e4c1 Mon Sep 17 00:00:00 2001 From: Iori Yanokura Date: Fri, 12 Jan 2024 12:25:00 +0900 Subject: [PATCH] [GA] Skip coverage comment --- .github/workflows/test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3cf68e3..7914a938 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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/action@v3.1.2 @@ -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