Skip to content

ci: run workflows on pull_request, restrict push to main#45

Merged
MikaAK merged 1 commit into
mainfrom
ci/run-on-pull-requests
Apr 27, 2026
Merged

ci: run workflows on pull_request, restrict push to main#45
MikaAK merged 1 commit into
mainfrom
ci/run-on-pull-requests

Conversation

@MikaAK
Copy link
Copy Markdown
Owner

@MikaAK MikaAK commented Apr 27, 2026

Summary

  • All four workflows (Test, Coverage, Credo, Dialyzer) used on: push, which fires on every branch push and on PR sync events — every PR update kicked off two duplicate runs.
  • Switched each workflow to:
    on:
      push:
        branches: [main]
      pull_request:
    which runs CI once per PR update plus once on main after merge (covering post-squash branch protection / status checks).

Test plan

  • Open this PR — CI should kick off via the pull_request trigger and report Test / Coverage / Credo / Dialyzer once each.
  • After merge to main, those four checks fire again on main via the push: branches: [main] trigger.
  • Pushing to a feature branch without an open PR should NOT trigger any workflow runs.

Previously every CI workflow (Test, Coverage, Credo, Dialyzer) ran on
'on: push', which fired for both branch pushes and PR sync events,
duplicating runs. Switch to:

  on:
    push:
      branches: [main]
    pull_request:

This runs CI once per PR update (and once on main after merge) instead
of twice for every PR push.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.46%. Comparing base (ff1c3df) to head (a25c660).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
- Coverage   83.46%   83.46%   -0.01%     
==========================================
  Files          22       22              
  Lines         617      635      +18     
==========================================
+ Hits          515      530      +15     
- Misses        102      105       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MikaAK MikaAK merged commit 964b4a6 into main Apr 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant