Skip to content

Commit d0ed675

Browse files
authored
DevBox migration, unified lint, unified test and simplified CI (#1670)
DevBox/Just monorepo tools
1 parent 7d17ec7 commit d0ed675

File tree

185 files changed

+3153
-2791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+3153
-2791
lines changed

.githooks/detect-ethereum-keys

Lines changed: 0 additions & 18 deletions
This file was deleted.

.githooks/detect-rpc-urls

Lines changed: 0 additions & 17 deletions
This file was deleted.

.githooks/go-lint

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,2 @@
11
#!/bin/bash
2-
3-
# Find all 'go.mod' files, get their directories, and run 'go mod tidy'
4-
find "./" -type f -name 'go.mod' -print0 | while IFS= read -r -d $'\0' file; do
5-
directory=$(dirname "$file")
6-
cd "$directory" || exit 1
7-
8-
# Run linter and capture exit status
9-
set +e
10-
golangci-lint run -v
11-
linting_result=$?
12-
set -e
13-
14-
# Check linting result
15-
if [[ $linting_result -ne 0 ]]; then
16-
echo -e "Executing linters in $directory... \e[31mNOK!\e[0m\n"
17-
echo -e "Run \`cd $directory && golangci-lint run --fix -v\` and fix the issues\n"
18-
exit 1
19-
else
20-
echo -e "Executing linters in $directory... \e[32mOK!\e[0m\n"
21-
fi
22-
cd - || exit 1
23-
done
2+
devbox run -- just lint-all

.githooks/go-mod-local-replace

Lines changed: 0 additions & 14 deletions
This file was deleted.

.githooks/go-mod-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ find "./" -type f -name 'go.mod' -print0 | while IFS= read -r -d $'\0' file; do
1010
go mod tidy
1111
cd - || exit 1
1212
done
13+
1314
# pre-commit stashes changes before running the hooks so we can use git to check for changes here
1415
# Run git diff and capture output
1516
output=$(git diff --stat)

.githooks/go-test-build

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
set -e
44

5-
# Find all 'go.mod' files, get their directories, and run an empty 'go test' in them to compile the tests.
6-
find "./" -type f -name 'go.mod' -print0 | while IFS= read -r -d $'\0' file; do
5+
# Find all 'go.mod' files, excluding the 'seth' directory, get their directories, and run an empty 'go test' in them to compile the tests.
6+
# Seth is excluded because it can't be tested like this, env vars are required and setup
7+
find "./" -path "./seth" -prune -o -type f -name 'go.mod' -print0 | while IFS= read -r -d $'\0' file; do
78
dir=$(dirname "$file")
89
echo "Executing cd \"$dir\" && go test -run=^# ./..."
910
cd "$dir"
1011
go test -run=^# ./...
1112
cd -
12-
done
13+
done

.githooks/goimports

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
devbox run -- just goimports-all

.githooks/run-unit-tests

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/framework.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)