diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index d3efebb5c..acbb1094b 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -66,11 +66,12 @@ jobs: if: steps.cache-gui-fe-build.outputs.cache-hit != 'true' run: npm ci - - if: steps.cache-gui-fe-build.outputs.cache-hit != 'true' + - name: Test Gui + if: steps.cache-gui-fe-build.outputs.cache-hit != 'true' run: npm test - name: Code coverage - if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-fe-build.outputs.cache-hit != 'true' + if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-fe-build.outputs.cache-hit != 'true' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name uses: artiomtr/jest-coverage-report-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -128,6 +129,7 @@ jobs: echo "HASH=$(cat hash.txt)" >> $GITHUB_OUTPUT rm hash.txt shell: bash + - name: Restore cached core frontend build id: cache-gui-core-fe-build uses: actions/cache@v4 @@ -157,7 +159,7 @@ jobs: run: npm test - name: Code coverage - if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-core-fe-build.outputs.cache-hit != 'true' + if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-core-fe-build.outputs.cache-hit != 'true' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name uses: artiomtr/jest-coverage-report-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/overall-tests.yml b/.github/workflows/overall-tests.yml index 571392fe9..ccf20c23c 100644 --- a/.github/workflows/overall-tests.yml +++ b/.github/workflows/overall-tests.yml @@ -20,7 +20,7 @@ jobs: coverage: timeout-minutes: 50 runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} + if: github.event_name == 'pull_request' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name steps: - uses: actions/checkout@v4