Browse Source

Merge JoinMarket-Org/joinmarket-clientserver#1591: Fix ShellCheck warnings and add ShellCheck to CI

3e71df586b Fix ShellCheck warnings (Kristaps Kaupe)
027682ab2c CI: Add ShellCheck (Kristaps Kaupe)

Pull request description:

  Could use `./test/lint/lint-shell.sh` instead, but this way was simpler.

  https://github.com/marketplace/actions/shellcheck

ACKs for top commit:
  roshii:
    utACK 3e71df586b

Tree-SHA512: 4f98464b397088293ea0c7736e835d94b7079c53f0958c36aeca62d68a586fd69fa05988591dbbba51f64824ef58e5341cc7930217fba0f2b2b4aa53e3735080
master
Kristaps Kaupe 2 years ago
parent
commit
911b156246
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 4
      .github/workflows/unittests.yml
  2. 2
      test/run_tests.sh
  3. 14
      test/testrunner/install_bitcoind.sh

4
.github/workflows/unittests.yml

@ -14,6 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
version: v0.9.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:

2
test/run_tests.sh

@ -181,7 +181,7 @@ run_jm_tests ()
mkdir -p miniircd
tar -xzf miniircd.tar.gz -C ./miniircd --strip-components=1
fi
if ! pip install -e .[test]; then
if ! pip install -e '.[test]'; then
echo "Joinmarket could not be installed. Exiting."
return 1
fi

14
test/testrunner/install_bitcoind.sh

@ -10,7 +10,7 @@ fi
if [[ "$(uname)" == "Linux" ]]; then
platform="x86_64-linux-gnu"
elif [[ "$(uname)" == "Darwin" ]]; then
if [[ $BITCOIND_VERSION > 23.0 || $BITCOIND_VERSION == 23.0 ]]; then
if [[ $(echo "$BITCOIND_VERSION > 23.0" | bc) == 1 || $(echo "$BITCOIND_VERSION == 23.0" | bc) == 1 ]]; then
platform="x86_64-apple-darwin"
else
platform="osx64"
@ -20,16 +20,16 @@ else
exit 1
fi
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
if sudo cp "$HOME/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind" /usr/local/bin/bitcoind
then
echo "found cached bitcoind"
sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli
sudo cp "$HOME/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli" /usr/local/bin/bitcoin-cli
else
mkdir -p ~/bitcoin && \
pushd ~/bitcoin && \
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \
tar xvfz bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli && \
wget "https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$platform.tar.gz" && \
tar xvfz "bitcoin-$BITCOIND_VERSION-$platform.tar.gz" && \
sudo cp "./bitcoin-$BITCOIND_VERSION/bin/bitcoind" /usr/local/bin/bitcoind && \
sudo cp "./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli" /usr/local/bin/bitcoin-cli && \
popd
fi

Loading…
Cancel
Save