1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: fmt · clippy · test · build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust (stable + rustfmt + clippy)
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Formatting
run: cargo fmt --all -- --check
- name: Clippy (deny warnings)
run: cargo clippy --all-targets -- -D warnings
- name: Tests
run: cargo test --all
- name: Release build
run: cargo build --release
- name: Validate example projects
run: |
for ex in examples/rust-app examples/node-app examples/python-app; do
echo "::group::flux validate $ex"
(cd "$ex" && "$GITHUB_WORKSPACE/target/release/flux" validate)
echo "::endgroup::"
done