Skip to content

Commit

Permalink
Limit when CI workflows are triggered
Browse files Browse the repository at this point in the history
* skip test workflows if only documentation is changed

* skip Cirrus CI and AppVeyor workflows if only .github directory
  content is changed

* avoid double testing
  • Loading branch information
rmisev committed Oct 3, 2023
1 parent c869064 commit 38d5dc7
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
branches:
only: [ main ]

skip_commits:
files:
- '.github/**/*'
- 'doc/**/*'
- '**/*.md'

environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
Expand Down
4 changes: 3 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
task:
skip: "changesIncludeOnly('.github/**' , 'doc/**', '**.md')"

name: FreeBSD
freebsd_instance:
matrix:
image_family: freebsd-13-1
image_family: freebsd-13-2
image_family: freebsd-12-3
install_script: |
pkg install -y cmake git
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Static Analysis

on: [push, pull_request]
on:
push:
branches: [ main ]
paths-ignore: [ 'doc/**', '**.md' ]
pull_request:
paths-ignore: [ 'doc/**', '**.md' ]

jobs:
build:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: macOS

on: [push, pull_request]
on:
push:
branches: [ main ]
paths-ignore: [ 'doc/**', '**.md' ]
pull_request:
paths-ignore: [ 'doc/**', '**.md' ]

jobs:
build:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Ubuntu

on: [push, pull_request]
on:
push:
branches: [ main ]
paths-ignore: [ 'doc/**', '**.md' ]
pull_request:
paths-ignore: [ 'doc/**', '**.md' ]

jobs:
build:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Windows

on: [push, pull_request]
on:
push:
branches: [ main ]
paths-ignore: [ 'doc/**', '**.md' ]
pull_request:
paths-ignore: [ 'doc/**', '**.md' ]

jobs:
build:
Expand Down

0 comments on commit 38d5dc7

Please sign in to comment.