Skip to content

Commit

Permalink
ci: re-enable run on pull_request
Browse files Browse the repository at this point in the history
Pull request trigger is necessary for accurate testing of the "impact" of a PR,
whilst push trigger is necessary for accurate coverage diffs on PRs that are
behind base branch during CI trigger.

Partially reverts: 21d0f1e

Signed-off-by: Rifa Achrinza <[email protected]>
  • Loading branch information
achrinza committed Sep 27, 2024
1 parent e64ec1d commit 1758144
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on: [push]
on:
- push
- pull_request

permissions: {}

Expand All @@ -9,6 +11,13 @@ jobs:
name: Code Lint
runs-on: ubuntu-latest
permissions: {}
if: >-
${{
github.event_name == 'pull_request' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
)}}
steps:
- name: Harden Runner
Expand Down Expand Up @@ -42,6 +51,7 @@ jobs:
name: Commit Lint
runs-on: ubuntu-latest
permissions: {}
if: ${{ github.event_name == 'pull_request' }}

steps:
- name: Harden Runner
Expand Down Expand Up @@ -117,6 +127,7 @@ jobs:

- name: Publish Coverage Report
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0
if: ${{ github.event_name == 'push' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage/lcov.info
Expand All @@ -125,6 +136,13 @@ jobs:
name: Android Build
runs-on: ubuntu-latest
permissions: {}
if: >-
${{
github.event_name == 'pull_request' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
)}}
steps:
- name: Harden Runner
Expand Down

0 comments on commit 1758144

Please sign in to comment.