Skip to content

Commit

Permalink
Trim CI config
Browse files Browse the repository at this point in the history
With the old configuration, we would run CI twice when pushing a commit and
opening a pull request. Or when pushing a commit that belongs to a pull request.

With the new configuration, we run CI once when opening a PR, and once when
pushing a commit that belongs to a pull request. And once when merging to
master (the `push` event). Importantly, this configuration still works for
contributions from forked repositories, since the `pull_request` events are
triggered on _our_ fork.
  • Loading branch information
bquorning committed Nov 7, 2023
1 parent d51b817 commit 97ba53a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: CI

on: [pull_request, push, workflow_dispatch]
on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
specs:
Expand All @@ -23,7 +28,7 @@ jobs:
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: zendesk/checkout@v2
- uses: zendesk/checkout@v4
- name: Set up Ruby
uses: zendesk/setup-ruby@v1
with:
Expand Down

0 comments on commit 97ba53a

Please sign in to comment.