-
Notifications
You must be signed in to change notification settings - Fork 52
80 lines (75 loc) · 2.27 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
- 'dev'
- 'main'
pull_request:
jobs:
test_suite:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go
- name: Install Rust components
run: |
rustup set profile minimal
rustup default stable
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: test suite
# TODO there is some unused stuff we need to fix or remove
# make all-in-docker
run: |
cargo r --bin chain_upgrade
go test ./...
cargo r --bin onomyd_only
cargo r --bin ics_cdd
cargo r --bin clean
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Acquire the most recent nightly with a rustfmt component
- name: Install most recent Rustfmt
run: |
rustup set profile minimal
rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt)"
rustup component add rustfmt
- name: Run `cargo fmt`
run: |
cargo fmt -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Acquire the most recent nightly with a clippy component
- name: Install most recent Clippy
run: |
rustup set profile minimal
rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy)"
rustup component add clippy
- name: Run `cargo clippy`
run: |
cargo clippy --all --all-targets --all-features -- -D clippy::all
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/[email protected]
with:
folder-path: "docs"