2222 branches :
2323 - main
2424 pull_request :
25- branches :
26- - main
25+ paths :
26+ - ' **' # Include all files and directories in the repository by default.
27+ - ' !.github/ISSUE_TEMPLATE/**' # Exclude files and directories that don't impact tests or code like templates, metadata, and documentation.
28+ - ' !scripts/**'
29+ - ' !website/**'
30+ - ' !.asf.yml'
31+ - ' !.gitattributes'
32+ - ' !.gitignore'
33+ - ' !CONTRIBUTING.md'
34+ - ' !CHANGELOG.md'
35+ - ' !LICENSE'
36+ - ' !NOTICE'
37+ - ' !README.md'
2738
2839concurrency :
2940 group : ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
3041 cancel-in-progress : true
3142
3243env :
33- rust_msrv : " 1.85.0 "
44+ rust_msrv : " 1.87 "
3445
3546jobs :
3647 check :
@@ -47,15 +58,16 @@ jobs:
4758 uses : ./.github/actions/setup-builder
4859
4960 - name : Check License Header
50- uses : apache/skywalking-eyes/header@v0.7 .0
61+ uses : apache/skywalking-eyes/header@v0.8 .0
5162
52- - name : Install taplo-cli
53- uses : taiki-e/install-action@v2
54- with :
55- 5663 - name : Check toml format
5764 run : make check-toml
5865
66+ - name : Install protoc
67+ uses : arduino/setup-protoc@v3
68+ with :
69+ repo-token : ${{ secrets.GITHUB_TOKEN }}
70+
5971 - name : Cargo format
6072 run : make check-fmt
6173
6577 - name : Cargo clippy
6678 run : make check-clippy
6779
68- - name : Install cargo-machete
69- uses : taiki-e/install-action@v2
70- with :
71- tool : cargo-machete
7280 - name : Cargo Machete
73- run : cargo machete
81+ run : make cargo- machete
7482
7583 build :
7684 runs-on : ${{ matrix.os }}
8189 - macos-latest
8290 - windows-latest
8391 steps :
92+ - name : Maximize build space (Ubuntu)
93+ if : matrix.os == 'ubuntu-latest'
94+ uses : easimon/maximize-build-space@master
95+ with :
96+ remove-dotnet : " true"
97+ remove-android : " true"
98+ remove-haskell : " true"
99+ remove-codeql : " true"
100+ remove-docker-images : " true"
101+ root-reserve-mb : 10240
102+ temp-reserve-mb : 10240
103+
84104 - uses : actions/checkout@v5
85105
86106 - name : Setup Rust toolchain
@@ -89,6 +109,11 @@ jobs:
89109 - name : Cache Rust artifacts
90110 uses : Swatinem/rust-cache@v2
91111
112+ - name : Install protoc
113+ uses : arduino/setup-protoc@v3
114+ with :
115+ repo-token : ${{ secrets.GITHUB_TOKEN }}
116+
92117 - name : Build
93118 run : make build
94119
@@ -114,6 +139,13 @@ jobs:
114139
115140 unit :
116141 runs-on : ubuntu-latest
142+ strategy :
143+ matrix :
144+ test-suite :
145+ - { name: "default", args: "--all-targets --all-features --workspace" }
146+ - { name: "smol", args: "--all-targets --no-default-features --features smol --features storage-all --workspace" }
147+ - { name: "doc", args: "--doc --all-features --workspace" }
148+ name : Unit Tests (${{ matrix.test-suite.name }})
117149 steps :
118150 - name : Maximize build space
119151 uses : easimon/maximize-build-space@master
@@ -131,32 +163,33 @@ jobs:
131163 - name : Setup Rust toolchain
132164 uses : ./.github/actions/setup-builder
133165
166+ - name : Install protoc
167+ uses : arduino/setup-protoc@v3
168+ with :
169+ repo-token : ${{ secrets.GITHUB_TOKEN }}
170+
134171 - name : Cache Rust artifacts
135172 uses : Swatinem/rust-cache@v2
173+ with :
174+ key : ${{ matrix.test-suite.name }}
136175
137176 - name : Test
138- run : cargo test --no-fail-fast --all-targets --all-features --workspace
139-
140- - name : Async-std Test
141- run : cargo test --no-fail-fast --all-targets --no-default-features --features "async-std" --features "storage-all" --workspace
142-
143- - name : Doc Test
144- run : cargo test --no-fail-fast --doc --all-features --workspace
177+ run : cargo test --no-fail-fast ${{ matrix.test-suite.args }}
145178
146179 msrv :
147180 name : Verify MSRV
148181 runs-on : ubuntu-latest
149182 steps :
150183 - uses : actions/checkout@v5
151- - name : Setup Nightly Rust toolchain
152- uses : ./.github/actions/setup-builder
153- - name : Generate minimal versions lockfile
154- run : |
155- cargo generate-lockfile -Z direct-minimal-versions -Z minimal-versions
184+ - name : Install protoc
185+ uses : arduino/setup-protoc@v3
186+ with :
187+ repo-token : ${{ secrets.GITHUB_TOKEN }}
156188 - name : Setup MSRV Rust toolchain
157189 uses : ./.github/actions/setup-builder
158190 with :
159191 rust-version : ${{ env.rust_msrv }}
192+ - name : Setup Nightly Rust toolchain
193+ uses : ./.github/actions/setup-builder
160194 - name : Check MSRV
161- run : |
162- cargo +${{ env.rust_msrv }} check --locked --workspace
195+ run : make check-msrv
0 commit comments