ci: switch to node-version lts #298
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
name: CI/CD | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # This ensures you have the full git history | |
- 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 | |
- name: Debug - List Processes | |
run: ps aux | |
- run: yarn build | |
- name: Debug - List Processes | |
run: ps aux | |
- name: Run tests with detailed output | |
run: | | |
echo "::group::Detailed Test Output" | |
yarn test | |
echo "::endgroup::" | |
- name: Get test coverage | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# Modified tmate step without the timeout-minutes option | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ failure() }} |