forked from Blockstream/electrs
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (62 loc) · 1.99 KB
/
rust.yml
File metadata and controls
74 lines (62 loc) · 1.99 KB
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
name: CI
on:
push:
branches:
- main
- master
- new-index
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 20
permissions:
contents: read
pull-requests: write
env:
CARGO_TERM_COLOR: always
steps:
- name: setup
run: sudo apt install -y libfuse2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: "false"
- name: Cache cargo registry
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
#- name: Check formatting
# run: cargo fmt -- --check
- name: Setup Rust toolchain
run: rustup default 1.75.0
- name: Check for errors
run: cargo check
- name: Tests (Bitcoin mode, REST+Electrum)
run: RUST_LOG=debug cargo test
- name: Tests (Liquid mode, REST)
run: RUST_LOG=debug cargo test --features liquid
nix:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: "false"
- uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- run: nix build .
continue-on-error: true