Skip to content

Commit

Permalink
Skip Codecov on forks
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa committed Aug 4, 2024
1 parent 556a2ef commit d1f5b67
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: "Continuous Integration"

on:
# Trigger only on pushes to master, or pull requests to master
push:
branches:
- master
paths-ignore:
- '**.md'
- 'img/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'img/**'
Expand All @@ -16,8 +21,6 @@ jobs:
tests:
name: "CI"
runs-on: ${{ matrix.os }}
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
matrix:
Expand Down Expand Up @@ -78,8 +81,6 @@ jobs:
test-vcs:
name: "Test VCS"
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
matrix:
Expand Down Expand Up @@ -154,7 +155,10 @@ jobs:
- name: "List all coverage reports"
run: echo coverage_reports=./coverage/$(ls -m coverage/ | sed "s/, */,.\/coverage\//g") >> $GITHUB_ENV

- uses: codecov/codecov-action@v4
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
# No need to run this step on forks.
if: ${{ 'bmitch/churn-php' == github.repository }}
with:
files: ./coverage.xml,${{ env.coverage_reports }}
fail_ci_if_error: true
Expand All @@ -165,8 +169,6 @@ jobs:
analysis:
name: "Static Analysis"
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

steps:
- name: "Checkout"
Expand Down

0 comments on commit d1f5b67

Please sign in to comment.