diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce7ef5bda0c..6ba462962f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,13 @@ name: Main on: workflow_dispatch: pull_request: + push: + # It is just for developer convenience so pushes to forks triggers the same + # workflow as for pull requests. For branches that match the following + # ignore patterns, the workflow has to be triggered manually. + branches-ignore: + - master + - stable-* jobs: src_checkers: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 695d4a996a4..743f88feb64 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -48,5 +48,11 @@ jobs: - name: Run the build env: TEST_BUILD: ${{ matrix.TEST_BUILD }} - COVERAGE: ${{ matrix.COVERAGE }} + # Pushes to branches on developer forks (please see the caller workflow) + # won't measure coverage. Coverage is meant to be measured only for + # pull requests. + # Note: Pull requests to forks will measure coverage as well. + # Note: github.event_name for a workflow which has been called by + # another workflow contains the triggering event of the caller workflow. + COVERAGE: ${{ github.event_name == 'pull_request' && matrix.COVERAGE || 0 }} run: cd $WORKDIR && ./build-CI.sh