-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3893 from eval-exec/debug/ci_cli_test
CI: Fix CKB command line usage test case by bats-core/bats
- Loading branch information
Showing
4 changed files
with
73 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,37 +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: Setup BATS testing framework | ||
uses: mig4/[email protected] | ||
- name: Setup Bats libs | ||
uses: brokenpip3/[email protected] | ||
with: | ||
support-install: true | ||
support-path: /usr/lib/bats-support | ||
assert-install: true | ||
assert-path: /usr/lib/bats-assert | ||
detik-install: false | ||
file-install: false | ||
- 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 && ./cli_test.sh | ||
make cli-test | ||
shell: bash | ||
env: | ||
RUNNER_LABEL: ${{ needs.prologue.outputs.linux_runner_label }} |
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
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
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