Skip to content

Commit

Permalink
Runs the build when pushing to master or a PR branch
Browse files Browse the repository at this point in the history
Previously, pushing to a PR branch would cause the build
to run twice: once in response to the `push` event and once
in response to the `pull_request` event.

This would often cause one of the builds to fail, due to a
race condition when uploading the code coverage report to
Coveralls.

This commit prevents this from happening by running the build
only on pushes to the `master` branch, as well as to any branch
associated to a PR.
  • Loading branch information
ecampidoglio committed Aug 23, 2024
1 parent 798861c commit 6e4d1bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build and Test
Expand Down

0 comments on commit 6e4d1bf

Please sign in to comment.