-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.74 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI/CD
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Setup Yarn
run: yarn set version 3.2.0
- name: Cache Bitcoin node
id: bitcoin-cache
uses: actions/cache@v2
with:
path: ~/bitcoin
key: ${{ runner.os }}-cache
- name: Download Bitcoin node
if: steps.bitcoin-cache.outputs.cache-hit != 'true'
run: |
wget -P ~/bitcoin https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
- name: Start Bitcoin node
run: |
cd ~/bitcoin
tar -xvf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
cp bitcoin-0.20.0/bin/* /usr/local/bin/
bitcoind -reindex -txindex -regtest -daemon -rpcport=18443 -rpcuser=bitcoin -rpcpassword=local321 -deprecatedrpc=signrawtransaction -fallbackfee=0.00001 -addresstype=p2sh-segwit -zmqpubrawblock=tcp://127.0.0.1:29000 -zmqpubrawtx=tcp://127.0.0.1:29000
sleep 5
bitcoin-cli -regtest -rpcport=18443 -rpcuser=bitcoin -rpcpassword=local321 generatetoaddress 101 $(bitcoin-cli -regtest -rpcport=18443 -rpcuser=bitcoin -rpcpassword=local321 getnewaddress '' 'bech32')
- name: Cache node_modules
id: node-modules-cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: |
node_modules
*/*/node_modules
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- run: yarn build
- run: yarn test