Skip to content

Commit 8c14c38

Browse files
authored
Improve CI to only run on relevant folders changes (#668)
This hopefully sorts out the CI to be similar for all languages. The relevant tests will only run for changes in the relevant folder + when changing the test folder as this where assets maybe that are shared between the different languages.
1 parent d3fd716 commit 8c14c38

File tree

6 files changed

+94
-156
lines changed

6 files changed

+94
-156
lines changed

.github/workflows/cpp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
paths:
66
- 'cpp/**'
7+
- 'test/**'
78
pull_request:
89
paths:
910
- 'cpp/**'
11+
- 'test/**'
1012

1113
jobs:
1214
build:

.github/workflows/java.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
paths:
6+
- 'java/**'
7+
- 'test/**'
8+
pull_request:
9+
paths:
10+
- 'java/**'
11+
- 'test/**'
12+
workflow_dispatch:
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
test-java:
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [ubuntu-latest, windows-latest, macos-latest]
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: taiki-e/install-action@v2
27+
with:
28+
tool: just
29+
- uses: ./.github/actions/mlt-setup-java
30+
- run: just -v env-info-java
31+
- if: matrix.os == 'ubuntu-latest'
32+
name: Lint Java code. If fails, run `just fmt-java` to reformat, and `just lint-java` to see issues locally
33+
run: just -v lint-java
34+
- run: just -v test-java
35+
- run: just -v test-java-cli
36+
- name: Test Maven local publishing
37+
run: cd java && ./gradlew publishMavenPublicationToMavenLocal

.github/workflows/javascript.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Javascript CI
2+
3+
on:
4+
push:
5+
paths:
6+
- 'ts/**'
7+
- 'test/**'
8+
pull_request:
9+
paths:
10+
- 'ts/**'
11+
- 'test/**'
12+
workflow_dispatch:
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
test-js:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v5
23+
- uses: taiki-e/install-action@v2
24+
with:
25+
tool: just
26+
- uses: ./.github/actions/mlt-setup-node
27+
- name: Lint JS code. If fails, run `just fmt-js` to reformat, and `just lint-js` to see issues locally
28+
run: just -v lint-js
29+
- run: just -v test-js
30+
- run: just -v build-js
31+
- name: Codecov upload
32+
if: '!cancelled()'
33+
uses: codecov/codecov-action@v5
34+
with:
35+
files: ts/coverage/coverage-final.json
36+
37+
bench-js:
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
matrix:
41+
os: [ubuntu-latest, windows-latest, macos-latest]
42+
steps:
43+
- uses: actions/checkout@v5
44+
- uses: taiki-e/install-action@v2
45+
with:
46+
tool: just
47+
- uses: ./.github/actions/mlt-setup-node
48+
- name: Bench JS decoder
49+
run: just -v bench-js

.github/workflows/rust-legacy.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/rust.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Rust CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
paths:
6+
- 'rust/**'
7+
- 'test/**'
68
pull_request:
7-
branches: [ main ]
9+
paths:
10+
- 'rust/**'
11+
- 'test/**'
812
workflow_dispatch:
913

1014
jobs:

.github/workflows/test.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)