Skip to content

Commit

Permalink
ci: Add shellcheck job (#191)
Browse files Browse the repository at this point in the history
* ci: Add shellcheck job

* Update op-e2e/celo/run_all_tests.sh

Co-authored-by: Karl Bartel <[email protected]>

---------

Co-authored-by: Karl Bartel <[email protected]>
  • Loading branch information
palango and karlb authored Jul 9, 2024
1 parent e120768 commit 33291db
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1394,9 +1394,9 @@ workflows:
requires:
- pnpm-monorepo
- cannon-build-test-vectors
# - shellcheck/check:
# name: shell-check
# # We don't need the `exclude` key as the orb detects the `.shellcheckrc`
# dir: .
# ignore-dirs:
# ./packages/contracts-bedrock/lib
- shellcheck/check:
name: shell-check
# We don't need the `exclude` key as the orb detects the `.shellcheckrc`
dir: .
ignore-dirs:
./packages/contracts-bedrock/lib
5 changes: 3 additions & 2 deletions op-e2e/celo/run_all_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#shellcheck disable=SC1091
set -eo pipefail

SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
Expand Down Expand Up @@ -50,7 +51,7 @@ then
echo All tests succeeded!
else
tput setaf 1 || true
echo $failures/$tests failed.
echo "$failures/$tests" failed.
fi
tput sgr0 || true
exit $failures
exit "$failures"
3 changes: 2 additions & 1 deletion op-e2e/celo/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export ETH_RPC_URL=http://127.0.0.1:9545
export ETH_RPC_URL_L1=http://127.0.0.1:8545

export ACC_PRIVKEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export ACC_ADDR=$(cast wallet address $ACC_PRIVKEY)
ACC_ADDR=$(cast wallet address $ACC_PRIVKEY)
export ACC_ADDR
export REGISTRY_ADDR=0x000000000000000000000000000000000000ce10
export TOKEN_ADDR=0x471ece3750da237f93b8e339c536989b8978a438
export FEE_CURRENCY_DIRECTORY_ADDR=0x71FFbD48E34bdD5a87c3c683E866dc63b8B2a685
2 changes: 1 addition & 1 deletion op-e2e/celo/test_token_duality.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#shellcheck disable=SC2086
#shellcheck disable=SC2086,SC1091
set -eo pipefail

source shared.sh
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/celo/test_weth_bridge.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#shellcheck disable=SC2086
#shellcheck disable=SC2086,SC1091
set -eo pipefail
set -x

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ reqenv "DEPLOY_CELO_CONTRACTS"
block=$(cast block finalized --rpc-url "$L1_RPC_URL")
timestamp=$(echo "$block" | awk '/timestamp/ { print $2 }')
blockhash=$(echo "$block" | awk '/hash/ { print $2 }')
batchInboxAddressSuffix=$(printf "%0$(expr 38 - ${#L2_CHAIN_ID})d" 0)$L2_CHAIN_ID
batchInboxAddressSuffix=$(printf "%0$((38 - ${#L2_CHAIN_ID}))d" 0)$L2_CHAIN_ID
batchInboxAddress=0xff$batchInboxAddressSuffix

# Generate the config file
Expand Down Expand Up @@ -132,5 +132,5 @@ EOL
)

# Write the config file
echo "$config" > deploy-config/$DEPLOYMENT_CONTEXT.json
echo "$config" > deploy-config/"$DEPLOYMENT_CONTEXT".json
echo "Created file deploy-config/$DEPLOYMENT_CONTEXT.json successfully."
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ EOL
)

# Write the config file
echo "$config" > deploy-config/$DEPLOYMENT_CONTEXT.json
echo "$config" > deploy-config/"$DEPLOYMENT_CONTEXT".json

0 comments on commit 33291db

Please sign in to comment.