-
Notifications
You must be signed in to change notification settings - Fork 86
59 lines (55 loc) · 1.75 KB
/
check_build_test.yml
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
name: Check-Build-Test
on:
push:
branches: ["main"]
paths-ignore:
- 'docs/**'
- 'fixtures/**'
- 'kube/**'
- '**.md'
pull_request:
branches: ["main"]
paths-ignore:
- 'docs/**'
- 'fixtures/**'
- 'kube/**'
- '**.md'
env:
CARGO_TERM_COLOR: always
jobs:
check_build_test:
name: Check-Build-Test
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: rooch-network/rooch/.github/actions/rust-setup@main
# with:
# fetch-depth: 0
- name: Check code format
run: cargo fmt -- --check
- name: Lint rust sources
run: cargo clippy --all-targets --all-features --tests --benches -- -D warnings
- name: Build
run: cargo build
- name: Execute rust tests
run: cargo nextest run --workspace --all-features
- name: Run CLI integration test
# cargo-nextest does not support the CLI integration test powered by Cucumber Rust.
# Use cargo test to run CLI integration tests.
# TODO: FIXME
run: cargo test -p testsuite --test integration
- name: Export rooch_types.yaml
run: cargo run --bin rooch abi export-rooch-types
- name: Run Rooch init
run: cargo run --bin rooch init
- name: Execute stdlib tests
run: cargo run --bin rooch move test -p moveos/moveos-stdlib/moveos-stdlib/
- name: Execute framework tests
run: cargo run --bin rooch move test -p crates/rooch-framework/
- name: Build and test example projects
run: ./scripts/pr.sh -e
- uses: CatChen/check-git-status-action@v1
with:
fail-if-not-clean: true # optional
push-if-not-clean: false # optional
targets: "." #optional