-
Notifications
You must be signed in to change notification settings - Fork 416
54 lines (43 loc) · 1.16 KB
/
rust.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
name: electrs
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *" # once a day
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
build-args:
[
--locked --no-default-features,
--locked,
--locked --features metrics_process,
]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Rust
run: rustup component add rustfmt clippy
- name: Format
run: cargo fmt --all -- --check
- name: Build
run: cargo build ${{ matrix.build-args }} --all
- name: Test
run: cargo test ${{ matrix.build-args }} --all
- name: Clippy
run: cargo clippy -- -D warnings
integration:
name: Integration
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: docker build -f Dockerfile.ci . --rm -t electrs:tests
- name: Test
run: docker run -v $PWD/contrib/:/contrib -v $PWD/tests/:/tests --rm electrs:tests bash /tests/run.sh