-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into redis_error
- Loading branch information
Showing
275 changed files
with
9,010 additions
and
2,203 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#!/bin/bash | ||
|
||
check_missing_value() { | ||
if [[ $1 -eq 0 || $2 == -* ]]; then | ||
echo "missing $3 argument value" | ||
exit 1 | ||
fi | ||
} | ||
|
||
timeout="" | ||
tags="" | ||
run="" | ||
race=false | ||
cover=false | ||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
--timeout) | ||
shift | ||
check_missing_value $# "$1" "--timeout" | ||
timeout=$1 | ||
shift | ||
;; | ||
--tags) | ||
shift | ||
check_missing_value $# "$1" "--tags" | ||
tags=$1 | ||
shift | ||
;; | ||
--run) | ||
shift | ||
check_missing_value $# "$1" "--run" | ||
run=$1 | ||
shift | ||
;; | ||
--race) | ||
race=true | ||
shift | ||
;; | ||
--cover) | ||
cover=true | ||
shift | ||
;; | ||
*) | ||
echo "Invalid argument: $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
packages=$(go list ./...) | ||
for package in $packages; do | ||
cmd="stdbuf -oL gotestsum --format short-verbose --packages=\"$package\" --rerun-fails=2 --no-color=false --" | ||
|
||
if [ "$timeout" != "" ]; then | ||
cmd="$cmd -timeout $timeout" | ||
fi | ||
|
||
if [ "$tags" != "" ]; then | ||
cmd="$cmd -tags=$tags" | ||
fi | ||
|
||
if [ "$run" != "" ]; then | ||
cmd="$cmd -run=$run" | ||
fi | ||
|
||
if [ "$race" == true ]; then | ||
cmd="$cmd -race" | ||
fi | ||
|
||
if [ "$cover" == true ]; then | ||
cmd="$cmd -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...,./go-ethereum/..." | ||
fi | ||
|
||
cmd="$cmd > >(stdbuf -oL tee -a full.log | grep -vE \"INFO|seal\")" | ||
|
||
echo "" | ||
echo running tests for "$package" | ||
echo "$cmd" | ||
|
||
if ! eval "$cmd"; then | ||
exit 1 | ||
fi | ||
done |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: ShellCheck CI | ||
run-name: ShellCheck CI triggered from @${{ github.actor }} of ${{ github.head_ref }} | ||
|
||
on: | ||
workflow_dispatch: | ||
merge_group: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
shellcheck: | ||
name: Run ShellCheck | ||
runs-on: ubuntu-8 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
with: | ||
ignore_paths: >- | ||
./fastcache/** | ||
./contracts/** | ||
./safe-smart-account/** | ||
./go-ethereum/** | ||
./nitro-testnode/** | ||
./brotli/** | ||
./arbitrator/** |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,70 @@ | ||
name: Submodule Pin Check | ||
name: Merge Checks | ||
|
||
on: | ||
pull_request: | ||
pull_request_target: | ||
branches: [ master ] | ||
types: [synchronize, opened, reopened] | ||
|
||
permissions: | ||
statuses: write | ||
|
||
jobs: | ||
submodule-pin-check: | ||
name: Submodule Pin Check | ||
name: Check Submodule Pin | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
submodules: true | ||
persist-credentials: false | ||
ref: "${{ github.event.pull_request.head.sha }}" | ||
|
||
- name: Check all submodules are ancestors of origin/HEAD or configured branch | ||
run: ${{ github.workspace }}/.github/workflows/submodule-pin-check.sh | ||
run: | | ||
status_state="pending" | ||
declare -Ar exceptions=( | ||
[contracts]=origin/develop | ||
[nitro-testnode]=origin/master | ||
#TODO Rachel to check these are the intended branches. | ||
[arbitrator/langs/c]=origin/vm-storage-cache | ||
[arbitrator/tools/wasmer]=origin/adopt-v4.2.8 | ||
) | ||
divergent=0 | ||
for mod in `git submodule --quiet foreach 'echo $name'`; do | ||
branch=origin/HEAD | ||
if [[ -v exceptions[$mod] ]]; then | ||
branch=${exceptions[$mod]} | ||
fi | ||
if ! git -C $mod merge-base --is-ancestor HEAD $branch; then | ||
echo $mod diverges from $branch | ||
divergent=1 | ||
fi | ||
done | ||
if [ $divergent -eq 0 ]; then | ||
status_state="success" | ||
else | ||
resp="$(curl -sSL --fail-with-body \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/${{ github.event.pull_request.head.sha }}/statuses")" | ||
if ! jq -e '.[] | select(.context == "Submodule Pin Check")' > /dev/null <<< "$resp"; then | ||
# Submodule pin check is failling and no status exists | ||
# Keep it without a status to keep the green checkmark appearing | ||
# Otherwise, the commit and PR's CI will appear to be indefinitely pending | ||
# Merging will still be blocked until the required status appears | ||
exit 0 | ||
fi | ||
fi | ||
curl -sSL --fail-with-body \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/${{ github.event.pull_request.head.sha }}" \ | ||
-d '{"context":"Submodule Pin Check","state":"'"$status_state"'"}' |
Oops, something went wrong.