Skip to content

Commit

Permalink
ci: use make cli-test to run ci_cli_bats_test CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Mar 24, 2023
1 parent 8bd2bb5 commit 108d022
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/ci_integration_tests_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,33 +91,10 @@ jobs:
- run: rustup component add clippy
- run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config libclang-dev
- uses: actions/checkout@v3
- name: make and copy ckb binary and testcases to bats_testbed directory
- name: build ckb and run bats cli test
run: |
make build
mkdir -p /tmp/bats_testbed
cp target/release/ckb /tmp/bats_testbed/
cp util/app-config/src/tests/*.bats /tmp/bats_testbed/
cp util/app-config/src/tests/cli_test.sh /tmp/bats_testbed/
chmod a+x /tmp/bats_testbed/cli_test.sh
- name: checkout pre-synced file from ckb-asset repo
uses: actions/checkout@v3
with:
repository: nervosnetwork/ckb-assets
ref: v0.1.0
- name: init ckb bats testbed
run: |
mv cli_bats_env/ckb_mainnet_4000.json /tmp/bats_testbed/ckb_mainnet_4000.json
cd /tmp/bats_testbed && ./ckb init --force && ./ckb import ckb_mainnet_4000.json
- name: run bats cases
run: |
cd /tmp/bats_testbed
git clone --depth 1 --branch v1.9.0 https://github.com/bats-core/bats-core.git bats-core/bats
git clone --depth 1 --branch v0.3.0 https://github.com/bats-core/bats-support.git bats-core/test_helper/bats-support
git clone --depth 1 --branch v2.1.0 https://github.com/bats-core/bats-assert.git bats-core/test_helper/bats-assert
sudo ./bats-core/bats/install.sh /usr/local
sudo bash ./bats-core/test_helper/bats-support/load.bash
sudo bash ./bats-core/test_helper/bats-assert/load.bash
./cli_test.sh
make cli-test
shell: bash
env:
RUNNER_LABEL: ${{ needs.prologue.outputs.linux_runner_label }}

0 comments on commit 108d022

Please sign in to comment.