-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e89330
commit 56e8c55
Showing
11 changed files
with
432 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: lint-check | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Run lint check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install Node.js dependencies | ||
run: npm install || npm install | ||
|
||
- name: Lint check | ||
run: npm run lint:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run regtest setup | ||
run: cd docker && docker compose up --quiet-pull -d | ||
|
||
- name: Wait for bitcoind | ||
run: | | ||
sudo apt install wait-for-it | ||
wait-for-it -h 127.0.0.1 -p 43782 -t 60 | ||
- name: Wait for electrum server | ||
run: wait-for-it -h 127.0.0.1 -p 60001 -t 60 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install Node.js dependencies | ||
run: npm install || npm install | ||
|
||
- name: Run Tests | ||
run: npm run test | ||
|
||
- name: Dump docker logs on failure | ||
if: failure() | ||
uses: jwalton/gh-docker-logs@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: type-check | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
typescript: | ||
name: Run type check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install Node.js dependencies | ||
run: npm install || npm install | ||
|
||
- name: Type check | ||
run: npm run tsc:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
services: | ||
bitcoind: | ||
container_name: bitcoin | ||
image: btcpayserver/bitcoin:26.0 | ||
restart: unless-stopped | ||
expose: | ||
- '43782' | ||
- '39388' | ||
ports: | ||
- '43782:43782' | ||
- '39388:39388' | ||
volumes: | ||
- 'bitcoin_home:/home/bitcoin/.bitcoin' | ||
environment: | ||
BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest} | ||
CREATE_WALLET: 'true' | ||
BITCOIN_WALLETDIR: '/walletdata' | ||
BITCOIN_EXTRA_ARGS: | | ||
rpcport=43782 | ||
rpcbind=0.0.0.0:43782 | ||
rpcallowip=0.0.0.0/0 | ||
port=39388 | ||
whitelist=0.0.0.0/0 | ||
maxmempool=500 | ||
rpcauth=polaruser:5e5e98c21f5c814568f8b55d83b23c1c$$066b03f92df30b11de8e4b1b1cd5b1b4281aa25205bd57df9be82caf97a05526 | ||
txindex=1 | ||
fallbackfee=0.00001 | ||
zmqpubrawblock=tcp://0.0.0.0:28334 | ||
zmqpubrawtx=tcp://0.0.0.0:28335 | ||
zmqpubhashblock=tcp://0.0.0.0:28336 | ||
bitcoinsetup: | ||
image: btcpayserver/bitcoin:26.0 | ||
depends_on: | ||
- bitcoind | ||
restart: 'no' | ||
volumes: | ||
- 'bitcoin_home:/home/bitcoin/.bitcoin' | ||
user: bitcoin | ||
# generate one block so electrs stop complaining | ||
entrypoint: | ||
[ | ||
'bash', | ||
'-c', | ||
'sleep 1; while ! bitcoin-cli -rpcconnect=bitcoind -generate 1; do sleep 1; done', | ||
] | ||
|
||
electrs: | ||
container_name: electrum | ||
image: getumbrel/electrs:v0.10.2 | ||
restart: unless-stopped | ||
depends_on: | ||
- bitcoind | ||
expose: | ||
- '60001' | ||
- '28334' | ||
- '28335' | ||
- '28336' | ||
ports: | ||
- '60001:60001' | ||
# - '28334:28334' | ||
# - '28335:28335' | ||
# - '28336:28336' | ||
volumes: | ||
- './electrs.toml:/data/electrs.toml' | ||
environment: | ||
- ELECTRS_NETWORK=regtest | ||
- ELECTRS_ELECTRUM_RPC_ADDR=electrs:60001 | ||
- ELECTRS_DAEMON_RPC_ADDR=bitcoind:43782 | ||
- ELECTRS_DAEMON_P2P_ADDR=bitcoind:39388 | ||
- ELECTRS_LOG_FILTERS=INFO | ||
|
||
|
||
volumes: | ||
bitcoin_home: | ||
|
||
networks: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
auth = "polaruser:polarpass" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.