Skip to content

Commit

Permalink
Filter paths that run CI (#279)
Browse files Browse the repository at this point in the history
* Filter paths that run CI
* Add dummy CI to check
  • Loading branch information
xsebek authored Nov 7, 2021
1 parent e94418e commit 95f2247
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/dummy-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# RUN IN CASE Haskell-CI DOES NOT RUN
# used for mergify check
name: Co-Haskell-CI
on:
push:
paths-ignore:
- '**.hs'
- '**.sw'
- '**.cabal'
- '*.yaml'
- 'data/**.yaml'
- 'cabal.project*'
# reuse the same filter for pull-requests
pull_request:
paths-ignore:
- '**.hs'
- '**.sw'
- '**.cabal'
- 'stack.yaml'
- '*.yaml'
- 'data/**.yaml'
- 'cabal.project*'
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Do nothing
run: exit 0
22 changes: 20 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Hand edited to add paths filter ;)
#
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' 'swarm.cabal'
Expand All @@ -14,8 +16,24 @@
#
name: Haskell-CI
on:
- push
- pull_request
push:
paths:
- '**.hs'
- '**.sw'
- '**.cabal'
- '*.yaml'
- 'data/**.yaml'
- 'cabal.project*'
# reuse the same filter for pull-requests
pull_request:
paths:
- '**.hs'
- '**.sw'
- '**.cabal'
- 'stack.yaml'
- '*.yaml'
- 'data/**.yaml'
- 'cabal.project*'
jobs:
linux:
# when changing the name or adding ghc version, please don't forget to update
Expand Down
7 changes: 5 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ pull_request_rules:
commit_message: title+body
name: Automatically merge pull requests
conditions:
- check-success=Haskell-CI - Linux - ghc-9.0.1
- check-success=Haskell-CI - Linux - ghc-8.10.4
- or:
- check-success=Co-Haskell-CI
- and:
- check-success=Haskell-CI - Linux - ghc-9.0.1
- check-success=Haskell-CI - Linux - ghc-8.10.4
- label=merge me
- ! '#approved-reviews-by>=1'
- ! '#changes-requested-reviews-by=0'
Expand Down

0 comments on commit 95f2247

Please sign in to comment.