-
Notifications
You must be signed in to change notification settings - Fork 188
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
504afda
commit 01b2b70
Showing
5 changed files
with
128 additions
and
101 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,37 @@ | ||
name: Unit tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ 6, 8, 10, 12, 14, 16, 18 ] | ||
name: Node ${{ matrix.node }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install docker-compose | ||
uses: KengoTODA/actions-setup-docker-compose@main | ||
with: | ||
version: '2.6.1' | ||
|
||
- name: Start containers | ||
run: docker-compose up -d --build --wait | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: docker-compose down |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,88 @@ | ||
sut: | ||
image: node:4 | ||
command: sh -c 'npm install && npm test' | ||
volumes: | ||
- .:/app | ||
environment: | ||
- CI=true | ||
links: | ||
- bitcoin-core | ||
- bitcoin-core-multi-wallet | ||
- bitcoin-core-ssl | ||
- bitcoin-core-username-only | ||
working_dir: /app | ||
version: '3.4' | ||
|
||
bitcoin-core: | ||
image: ruimarinho/bitcoin-core:0.17-alpine | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=10.211.0.0/16 | ||
-rpcallowip=172.17.0.0/16 | ||
-rpcallowip=192.168.0.0/16 | ||
-rpcpassword=bar | ||
-rpcport=18443 | ||
-rpcuser=foo | ||
-server | ||
ports: | ||
- 18443:18443 | ||
services: | ||
bitcoin-core: | ||
image: ruimarinho/bitcoin-core:0.17 | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=::/0 | ||
-rpcpassword=bar | ||
-rpcport=18443 | ||
-rpcuser=foo | ||
-server | ||
ports: | ||
- 18443:18443 | ||
healthcheck: | ||
test: curl --fail "http://foo@localhost:18443/rest/chaininfo.json" || exit 1 | ||
interval: 2s | ||
retries: 100 | ||
start_period: 2s | ||
timeout: 2s | ||
|
||
bitcoin-core-multi-wallet: | ||
image: ruimarinho/bitcoin-core:0.17-alpine | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=10.211.0.0/16 | ||
-rpcallowip=172.17.0.0/16 | ||
-rpcallowip=192.168.0.0/16 | ||
-rpcpassword=bar | ||
-wallet=wallet1 | ||
-wallet=wallet2 | ||
-rpcport=18453 | ||
-rpcuser=foo | ||
-server | ||
ports: | ||
- 18453:18453 | ||
bitcoin-core-multi-wallet: | ||
image: ruimarinho/bitcoin-core:0.17 | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=::/0 | ||
-rpcpassword=bar | ||
-wallet=wallet1 | ||
-wallet=wallet2 | ||
-rpcport=18443 | ||
-rpcuser=foo | ||
-server | ||
ports: | ||
- 18453:18443 | ||
healthcheck: | ||
test: curl --fail "http://foo@localhost:18443/rest/chaininfo.json" || exit 1 | ||
interval: 2s | ||
retries: 100 | ||
start_period: 2s | ||
timeout: 2s | ||
|
||
bitcoin-core-ssl: | ||
image: ruimarinho/bitcoin-core:0.11-alpine | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=10.211.0.0/16 | ||
-rpcallowip=172.17.0.0/16 | ||
-rpcallowip=192.168.0.0/16 | ||
-rpcpassword=bar | ||
-rpcport=18463 | ||
-rpcssl | ||
-rpcsslcertificatechainfile=/etc/ssl/bitcoind/cert.pem | ||
-rpcsslprivatekeyfile=/etc/ssl/bitcoind/key.pem | ||
-rpcuser=foo | ||
-server | ||
volumes: | ||
- ./test/config/ssl:/etc/ssl/bitcoind | ||
ports: | ||
- 18463:18463 | ||
bitcoin-core-ssl: | ||
image: ruimarinho/bitcoin-core:0.11 | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=::/0 | ||
-rpcpassword=bar | ||
-rpcport=18443 | ||
-rpcssl | ||
-rpcsslcertificatechainfile=/etc/ssl/bitcoind/cert.pem | ||
-rpcsslprivatekeyfile=/etc/ssl/bitcoind/key.pem | ||
-rpcuser=foo | ||
-server | ||
volumes: | ||
- ./test/config/ssl:/etc/ssl/bitcoind | ||
ports: | ||
- 18463:18443 | ||
healthcheck: | ||
test: curl --fail -k "https://foo@localhost:18443/rest/chaininfo.json" || exit 1 | ||
interval: 2s | ||
retries: 100 | ||
start_period: 2s | ||
timeout: 2s | ||
|
||
bitcoin-core-username-only: | ||
image: ruimarinho/bitcoin-core:0.11-alpine | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=10.211.0.0/16 | ||
-rpcallowip=172.17.0.0/16 | ||
-rpcallowip=192.168.0.0/16 | ||
-rpcport=18473 | ||
-rpcuser=foo | ||
-server | ||
ports: | ||
- 18473:18473 | ||
bitcoin-core-username-only: | ||
image: ruimarinho/bitcoin-core:0.11 | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rest | ||
-rpcallowip=::/0 | ||
-rpcport=18443 | ||
-rpcuser=foo | ||
-server | ||
ports: | ||
- 18473:18443 | ||
healthcheck: | ||
test: curl --fail "http://foo@localhost:18443/rest/chaininfo.json" || exit 1 | ||
interval: 2s | ||
retries: 100 | ||
start_period: 2s | ||
timeout: 2s |
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