-
Notifications
You must be signed in to change notification settings - Fork 5
96 lines (76 loc) · 2.76 KB
/
Copy pathtests.yml
File metadata and controls
96 lines (76 loc) · 2.76 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Tests
on:
pull_request:
branches: [ main, master ]
push:
branches: [ main, master ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
RUST_LOG: orange_sdk=debug,graduated_rebalancer=debug,ldk_node=info,integration_tests=info,test_utils=info
jobs:
rust_tests:
name: Rust Checks
runs-on: self-hosted
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "30.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2.7.8
- name: Cache package-enabled Esplora
id: cache-esplora
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-submit-package-8c06d801-${{ runner.os }}-${{ runner.arch }}
- name: Build package-enabled Esplora
if: steps.cache-esplora.outputs.cache-hit != 'true'
run: |
./scripts/build_package_esplora.sh "bin/electrs-${{ runner.os }}-${{ runner.arch }}"
- name: Configure package-enabled Esplora
run: echo "ELECTRS_EXE=$(pwd)/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Check formatting
run: cargo fmt --check
- name: Check clippy
run: ./ci/check-lint.sh
- name: Check examples
run: cargo check -p orange-cli
- name: Run tests
run: cargo test --features _test-utils -- --test-threads=2 --nocapture
cashu_tests:
name: Cashu Tests
runs-on: self-hosted
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "30.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2.7.8
- name: Cache package-enabled Esplora
id: cache-esplora
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-submit-package-8c06d801-${{ runner.os }}-${{ runner.arch }}
- name: Build package-enabled Esplora
if: steps.cache-esplora.outputs.cache-hit != 'true'
run: |
./scripts/build_package_esplora.sh "bin/electrs-${{ runner.os }}-${{ runner.arch }}"
- name: Configure package-enabled Esplora
run: echo "ELECTRS_EXE=$(pwd)/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Run cashu tests
run: cargo test --features _cashu-tests -- --test-threads=2 --nocapture