-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (100 loc) · 3.33 KB
/
functional.yml
File metadata and controls
116 lines (100 loc) · 3.33 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Functional tests
on:
pull_request:
merge_group:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
lint:
name: Lint functional test files
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
working-directory: functional-tests
activate-environment: true
enable-cache: true
cache-suffix: "functional-tests"
python-version: "3.12"
- name: Check formatting
working-directory: functional-tests
run: uv run ruff format --check
- name: Check types
working-directory: functional-tests
run: uv run ty check
- name: Lint
working-directory: functional-tests
run: uv run ruff check
run:
name: Run functional tests
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
with:
persist-credentials: false
- name: Install bitcoind
env:
BITCOIND_VERSION: "30.2"
BITCOIND_ARCH: "x86_64-linux-gnu"
run: |
curl -fsSLO --proto "=https" --tlsv1.3 "https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$BITCOIND_ARCH.tar.gz"
curl -fsSLO --proto "=https" --tlsv1.3 "https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/SHA256SUMS"
sha256sum --ignore-missing --check SHA256SUMS
tar xzf "bitcoin-$BITCOIND_VERSION-$BITCOIND_ARCH.tar.gz"
sudo install -m 0755 -t /usr/local/bin bitcoin-"$BITCOIND_VERSION"/bin/*
bitcoind --version
rm -rf SHA256SUMS "bitcoin-$BITCOIND_VERSION" "bitcoin-$BITCOIND_VERSION-$BITCOIND_ARCH.tar.gz"
- name: Install Rust toolchain
run: |
rustup toolchain install nightly --profile minimal
rustup default nightly
- name: Rust cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
cache-on-failure: true
- name: Install uv
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
working-directory: functional-tests
activate-environment: true
enable-cache: true
cache-suffix: "functional-tests"
python-version: "3.12"
- name: Run functional tests
env:
NO_COLOR: "1"
LOG_LEVEL: "info"
run: |
cd functional-tests
./run_test.sh
functional-success:
name: Check that functional tests pass
runs-on: ubuntu-latest
if: always()
needs:
- lint
- run
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
with:
jobs: ${{ toJSON(needs) }}