-
Notifications
You must be signed in to change notification settings - Fork 19
129 lines (127 loc) · 3.67 KB
/
modules-check.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: modules-check
permissions:
contents: read
on:
push:
branches: [main]
paths:
- "modules/**"
pull_request:
paths:
- "modules/**"
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt --check
working-directory: ./modules
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: cargo clippy
working-directory: ./modules
run: cargo clippy --all-targets --all-features -- -D warnings
doc:
runs-on: ubuntu-latest
name: nightly / doc
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo doc
working-directory: ./modules
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
hack:
runs-on: ubuntu-latest
name: ubuntu / stable / features
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: cargo hack
working-directory: ./modules
run: |
cargo hack check --feature-powerset \
--mutually-exclusive-features \
wynd,osmosis,astroport,bow,terraswap,astrovault,testing,osmosis-test,node-tests,interface,cw-orch,schema \
--lib --tests
# Find any unused dependencies
unused-deps:
runs-on: ubuntu-latest
name: nigtly / unused-deps
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Setup sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"
- name: Install cargo-machete
uses: clechasseur/rs-cargo@v2
with:
command: install
args: cargo-machete
- name: Machete
uses: clechasseur/rs-cargo@v2
with:
command: machete
working-directory: ./modules