@@ -2,9 +2,17 @@ name: Build code0-flow crate
22
33on :
44 push :
5+ pull_request :
6+
7+ permissions :
8+ contents : read
9+
10+ env :
11+ CARGO_TERM_COLOR : always
12+ RUST_BACKTRACE : full
513
614jobs :
7- crates :
15+ ci :
816 runs-on : ubuntu-latest
917
1018 defaults :
@@ -13,17 +21,39 @@ jobs:
1321
1422 steps :
1523 - uses : actions/checkout@v7
24+
1625 - name : Setup rust
17- run : rustup update --no-self-update stable
26+ run : |
27+ rustup update --no-self-update stable
28+ rustup component add rustfmt clippy
29+
1830 - name : Install protoc
19- run : curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.0-rc1/protoc-28.0-rc-1-linux-x86_64.zip && unzip protoc-28.0-rc-1-linux-x86_64.zip -d ${{ runner.temp }}/proto && chmod +x ${{ runner.temp }}/proto/bin/protoc && ${{ runner.temp }}/proto/bin/protoc --version
20- - name : Build crate
21- run : PATH=${{ runner.temp }}/proto/bin:$PATH cargo build
22- env :
23- RUST_BACKTRACE : ' full'
24- - name : Run Tests
25- run : PATH=${{ runner.temp }}/proto/bin:$PATH cargo test --features all
26- env :
27- RUST_BACKTRACE : ' full'
31+ run : |
32+ sudo apt-get update
33+ sudo apt-get install -y protobuf-compiler
34+ protoc --version
35+
36+ - name : Check formatting
37+ run : cargo fmt --all -- --check
38+
39+ - name : Check default feature set
40+ run : cargo check --locked --all-targets
41+
42+ - name : Check feature combinations
43+ run : |
44+ cargo check --locked --all-targets --no-default-features
45+ cargo check --locked --all-targets --features flow_definition
46+ cargo check --locked --all-targets --features flow_config
47+ cargo check --locked --all-targets --features flow_health
48+ cargo check --locked --all-targets --features flow_service
49+ cargo check --locked --all-targets --features flow_telemetry
50+ cargo check --locked --all-targets --features all
51+
52+ - name : Run clippy
53+ run : cargo clippy --locked --all-targets --features all -- -D warnings
54+
55+ - name : Run tests
56+ run : cargo test --locked --features all
57+
2858 - name : Package crate
29- run : cargo package --allow-dirty
59+ run : cargo package --locked
0 commit comments