-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (80 loc) · 2.24 KB
/
build.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: build
on:
push:
paths-ignore:
- "docs/**"
- "images/**"
- "**.md"
# manual trigger
workflow_dispatch: { }
env:
RUST_LOG: "debug"
RUST_LOG_SPAN_EVENTS: "new,close"
RUST_BACKTRACE: "1"
jobs:
lint_fmt:
name: Lint / Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
- name: license headers
run: |
cargo test -p kamu-repo-tools -- license_header
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- -D warnings
lint_deps:
name: Lint / Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: cargo-bins/cargo-binstall@main
- run: cargo binstall cargo-deny -y
- run: cargo deny check
- run: cargo binstall cargo-udeps -y
- run: cargo udeps --all-targets
test_linux:
name: Test / Linux
runs-on: ubuntu-latest
env:
CARGO_FLAGS: --profile ci --features kamu/ingest-ftp
NEXTEST_FLAGS: --cargo-profile ci --features kamu/ingest-ftp
KAMU_CONTRACTS_DIR: ../../../kamu-contracts
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: kamu-data/kamu-contracts
path: kamu-contracts
- uses: actions-rs/toolchain@v1
- uses: swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo tools
run: |
cargo binstall cargo-nextest -y --force
- name: Install foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Build node
run: cargo test ${{ env.CARGO_FLAGS }} --no-run
- name: Build contracts
working-directory: kamu-contracts
run: |
npm ci
forge build
- name: Run tests
run: cargo nextest run ${{ env.NEXTEST_FLAGS }}
- name: Check git diff
run: git diff && git diff-index --quiet HEAD