Skip to content

Commit 06fd074

Browse files
benthecarmanclaude
andcommitted
Add bitcoind/electrs setup to PostgreSQL CI
The PostgreSQL integration tests need BITCOIND_EXE and ELECTRS_EXE environment variables to spawn regtest nodes, but the workflow was missing the download, caching, and env var steps that rust.yml has. Generated with the assistance of AI (Claude Code). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e8f478b commit 06fd074

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/postgres-integration.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,29 @@ jobs:
3131
- name: Install Rust stable toolchain
3232
run: |
3333
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
34+
- name: Enable caching for bitcoind
35+
id: cache-bitcoind
36+
uses: actions/cache@v4
37+
with:
38+
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
39+
key: bitcoind-${{ runner.os }}-${{ runner.arch }}
40+
- name: Enable caching for electrs
41+
id: cache-electrs
42+
uses: actions/cache@v4
43+
with:
44+
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
45+
key: electrs-${{ runner.os }}-${{ runner.arch }}
46+
- name: Download bitcoind/electrs
47+
if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
48+
run: |
49+
source ./scripts/download_bitcoind_electrs.sh
50+
mkdir bin
51+
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
52+
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
53+
- name: Set bitcoind/electrs environment variables
54+
run: |
55+
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
56+
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
3457
- name: Run PostgreSQL store tests
3558
env:
3659
TEST_POSTGRES_URL: "host=localhost user=postgres password=postgres"

0 commit comments

Comments
 (0)