diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index cc8e0ad..3b63a20 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -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/**' @@ -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: @@ -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: @@ -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 @@ -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"