diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6038666c54..7c4dbaa8e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -420,6 +420,67 @@ jobs: # dangling processes killall -9 creditcoin-node + integration-test-csub-552: + needs: + - build-creditcoin-node + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Download creditcoin-node binary + uses: actions/download-artifact@v3 + with: + name: creditcoin-node + path: target/release + + - name: Import blocks + run: | + chmod a+x ./target/release/creditcoin-node + ./target/release/creditcoin-node import-blocks \ + --chain ./integration-tests/csub-552/reproSpec.json \ + --base-path ./integration-tests/csub-552/chaindata/node1 \ + --state-pruning archive --blocks-pruning archive \ + --database paritydb ./integration-tests/csub-552/repro.blocks + + - name: Start Node 1 + run: | + ./target/release/creditcoin-node \ + --chain ./integration-tests/csub-552/reproSpec.json \ + --validator --alice --mining-threads 1 --pruning archive \ + --mining-key 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY \ + --node-key 844794b5f1da387970d769debc3a30f729f3515841121ccecebed2582723e04d \ + --base-path ./integration-tests/csub-552/chaindata/node1 >creditcoin-node1.log 2>&1 & + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm install -g yarn + + - name: switchToPos() + run: | + pushd ./creditcoin-js/ && yarn install && yarn pack && popd || exit 1 + yarn --cwd ./scripts/js upgrade 'creditcoin-js' + yarn --cwd ./scripts/js switchToPos ws://127.0.0.1:9944 //Alice + + - name: Wait for finalized blocks to catch-up + run: | + # TODO + + - name: Upload logs + uses: actions/upload-artifact@v3 + if: always() + with: + name: logs + path: "*.log" + + - name: Kill SUT + run: | + # if all went well kill the node. Otherwise GitHub Actions would exit on the + # previous step killing everything and we don't have to worry about + # dangling processes + killall -9 creditcoin-node + javascript-lint: name: javascript-lint / ${{ matrix.directory }} runs-on: ubuntu-22.04