Skip to content

Commit 9aeaa83

Browse files
committed
Gate set_test_offer and add HRN test config
1 parent 760bfb6 commit 9aeaa83

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/kotlin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
./gradlew ktlintCheck
4242
4343
- name: Generate Kotlin JVM
44-
run: ./scripts/uniffi_bindgen_generate_kotlin.sh
44+
run: RUSTFLAGS="--cfg hrn_tests" ./scripts/uniffi_bindgen_generate_kotlin.sh
4545

4646
- name: Generate Kotlin Android
4747
run: ./scripts/uniffi_bindgen_generate_kotlin_android.sh

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: astral-sh/setup-uv@v7
2222

2323
- name: Generate Python bindings
24-
run: ./scripts/uniffi_bindgen_generate_python.sh
24+
run: RUSTFLAGS="--cfg hrn_tests" ./scripts/uniffi_bindgen_generate_python.sh
2525

2626
- name: Start bitcoind and electrs
2727
run: docker compose up -d

.github/workflows/rust.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,25 @@ jobs:
7272
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
7373
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
7474
- name: Build on Rust ${{ matrix.toolchain }}
75+
env:
76+
RUSTFLAGS: "--cfg hrn_tests"
7577
run: cargo build --verbose --color always
7678
- name: Build with UniFFI support on Rust ${{ matrix.toolchain }}
7779
if: matrix.build-uniffi
78-
run: cargo build --features uniffi --verbose --color always
80+
run: RUSTFLAGS="--cfg hrn_tests" cargo build --features uniffi --verbose --color always
7981
- name: Check release build on Rust ${{ matrix.toolchain }}
80-
run: cargo check --release --verbose --color always
82+
run: RUSTFLAGS="--cfg hrn_tests" cargo check --release --verbose --color always
8183
- name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }}
8284
if: matrix.build-uniffi
83-
run: cargo check --release --features uniffi --verbose --color always
85+
run: RUSTFLAGS="--cfg hrn_tests" cargo check --release --features uniffi --verbose --color always
8486
- name: Test on Rust ${{ matrix.toolchain }}
8587
if: "matrix.platform != 'windows-latest'"
8688
run: |
87-
RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test
89+
RUSTFLAGS="--cfg no_download --cfg cycle_tests --cfg hrn_tests" cargo test
8890
- name: Test with UniFFI support on Rust ${{ matrix.toolchain }}
8991
if: "matrix.platform != 'windows-latest' && matrix.build-uniffi"
9092
run: |
91-
RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --features uniffi
93+
RUSTFLAGS="--cfg no_download --cfg cycle_tests --cfg hrn_tests" cargo test --features uniffi
9294
9395
linting:
9496
name: Linting
@@ -102,8 +104,8 @@ jobs:
102104
rustup component add clippy
103105
- name: Ban `unwrap` in library code
104106
run: |
105-
cargo clippy --lib --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
106-
cargo clippy --lib --features uniffi --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
107+
RUSTFLAGS="--cfg hrn_tests" cargo clippy --lib --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
108+
RUSTFLAGS="--cfg hrn_tests" cargo clippy --lib --features uniffi --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
107109
108110
doc:
109111
name: Documentation

.github/workflows/swift.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: rustup default stable
1919

2020
- name: Generate Swift bindings
21-
run: ./scripts/uniffi_bindgen_generate_swift.sh
21+
run: RUSTFLAGS="--cfg hrn_tests" ./scripts/uniffi_bindgen_generate_swift.sh

0 commit comments

Comments
 (0)