Skip to content

Commit

Permalink
feat(ci): makes services work
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed May 7, 2024
1 parent 663124b commit eb3a408
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 25 deletions.
File renamed without changes.
File renamed without changes.
61 changes: 36 additions & 25 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,29 +167,52 @@ jobs:
bitcoind01:
image: kylemanna/bitcoind:latest
volumes:
- ${{ github.workspace }}/.github/mining-test/bitcoind01.conf:/etc/bitcoind/bitcoind.conf
- ${{ github.workspace }}/.github/mining-test/bitcoind01:/bitcoin/.bitcoin/
env:
DISABLEWALLET: "0"
ports:
- 31591:31591
- 32591:32591
options: >-
--entrypoint "/usr/local/bin/bitcoind"
--conf "/etc/bitcoind/bitcoind.conf"
# --name bitcoind01


bitcoind02:
image: kylemanna/bitcoind:latest
volumes:
- ${{ github.workspace }}/.github/mining-test/bitcoind02.conf:/etc/bitcoind/bitcoind.conf
env:
DISABLEWALLET: "0"
ports:
- 31592:31592
options: >-
--entrypoint "/usr/local/bin/bitcoind"
--conf "/etc/bitcoind/bitcoind.conf"
# bitcoind02:
# image: kylemanna/bitcoind:latest
# volumes:
# - ${{ github.workspace }}/.github/mining-test/bitcoind02:/bitcoin/.bitcoin/
# env:
# DISABLEWALLET: "0"
# ports:
# - 31592:31592
# - 32592:32592
# options: >-
# --entrypoint "/usr/local/bin/bitcoind"
## --name bitcoind02
steps:
- uses: actions/checkout@v2

- name: Check that bitcoind01 and bitcoind02 directories contain bitcoind.conf
run: |
ls -la ${{ github.workspace }}/.github/mining-test/bitcoind01
ls -la ${{ github.workspace }}/.github/mining-test/bitcoind02
# sudo cp -R ${{ github.workspace }}/.github/mining-test/bitcoind01/bitcoind.conf ${{ github.workspace }}/.test

- name: Restart bitcoin nodes
uses: docker://docker
with:
args: docker restart bitcoind01 bitcoind02

- name: Test bitcoin nodes
run: |
echo Test bitcoin node 1
curl -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind01:32591
echo Test bitcoin node 2
curl -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind01:32592


- name: Setup System Tools
run: |
apt-get update -y
Expand Down Expand Up @@ -234,18 +257,6 @@ jobs:
#
#

- name: Restart bitcoin nodes
uses: docker://docker
with:
args: docker restart bitcoind01 bitcoind02

- name: Test bitcoin nodes
run: |
echo Test bitcoin node 1
curl -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind01:32591
echo Test bitcoin node 2
curl -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://localhost:32592
- name: Generate BTC blocks
working-directory: mining-integration-tests
run: |
Expand Down

0 comments on commit eb3a408

Please sign in to comment.