Skip to content

Commit 9bfaa20

Browse files
authored
Only run CI on relevant changes (#307)
This requires that each folder is somewhat selfcontained. This wasn't the case for json schema as it's build related files were located in the project root. * Move the json schema into the `jsonschema/src` folder * Move the code to generate messages.md and validate json schemas into jsonschema folder * Only run "language" specific CI on changes to that language * Only run code gen specific CI on changes to JSON schemas and codegen This should save a tree or two.
1 parent 82a6b7f commit 9bfaa20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+172
-297
lines changed

.github/workflows/test-codegen.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,22 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- jsonschema/**
10+
- codegen/**
11+
- Makefile
12+
- .github/**
813
pull_request:
914
branches:
1015
- main
16+
paths:
17+
- jsonschema/**
18+
- codegen/**
19+
- Makefile
20+
- .github/**
1121
workflow_call:
22+
23+
1224

1325
jobs:
1426
test-codegen:
@@ -22,9 +34,11 @@ jobs:
2234
with:
2335
node-version: 18
2436
cache: "npm"
25-
37+
cache-dependency-path: jsonschema/package-lock.json
38+
2639
- name: validate the json schemas
2740
run: make validate
41+
working-directory: jsonschema
2842

2943
- name: Set up Ruby
3044
uses: ruby/setup-ruby@v1
@@ -33,8 +47,8 @@ jobs:
3347

3448
- name: generate code for all languages
3549
run: |
36-
make clean-all
37-
make generate-all
50+
make clean
51+
make generate
3852
3953
- name: check the repo is still clean after generation
4054
run: |

.github/workflows/test-cpp.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ on:
44
push:
55
branches:
66
- main
7-
- cpp*
87
- renovate/**
8+
paths:
9+
- cpp/**
10+
- Makefile
11+
- .github/**
912
pull_request:
1013
branches:
1114
- main
15+
paths:
16+
- cpp/**
17+
- Makefile
18+
- .github/**
1219
workflow_call:
1320

1421
jobs:

.github/workflows/test-dotnet.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- dotnet/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- dotnet/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-elixir.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- elixir/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- elixir/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-go.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- go/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- go/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-java.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- java/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- java/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-javascript.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- javascript/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- javascript/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-perl.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- perl/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- perl/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-php.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on:
55
branches:
66
- main
77
- renovate/**
8+
paths:
9+
- php/**
10+
- Makefile
11+
- .github/**
812
pull_request:
913
branches:
1014
- main
15+
paths:
16+
- php/**
17+
- Makefile
18+
- .github/**
1119
workflow_call:
1220

1321
jobs:

.github/workflows/test-python.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ on:
66
branches:
77
- main
88
- renovate/**
9+
paths:
10+
- python/**
11+
- Makefile
12+
- .github/**
913
pull_request:
1014
branches:
1115
- main
12-
workflow_dispatch:
16+
paths:
17+
- python/**
18+
- Makefile
19+
- .github/**
20+
workflow_call:
1321

1422
jobs:
1523
build:

0 commit comments

Comments
 (0)