-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add invariants PR job and e2e.sh (#25)
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
rpc="$1" | ||
if [ -z "$rpc" ]; then | ||
echo "RPC url must be provided as arg" | ||
exit 1 | ||
fi | ||
env="" | ||
case "$rpc" in | ||
"https://rpc.immutable.com") | ||
env="mainnet" | ||
;; | ||
"https://rpc.testnet.immutable.com") | ||
env="testnet" | ||
;; | ||
"https://rpc.dev.immutable.com") | ||
env="devnet" | ||
;; | ||
*) | ||
echo "Unknown RPC url: $rpc" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [ -z "$PRIV_KEY" ]; then | ||
echo "PRIV_KEY env var not set" | ||
exit 1 | ||
fi | ||
|
||
go test -count=1 -v ./tests/immutable -rpc="$rpc" -skipvoting=true -forks="$env" |
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,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Check version of geth src is aligned with changelog | ||
changelog_version=$(grep '## \[' < CHANGELOG.md | head -n1 | tr -d ' #[]') | ||
major=$(grep '// Major version component' < params/version.go | sed "s|//.*||" | sed "s|.* = ||") | ||
minor=$(grep '// Minor version component' < params/version.go | sed "s|//.*||" | sed "s|.* = ||") | ||
patch=$(grep '// Patch version component' < params/version.go | sed "s|//.*||" | sed "s|.* = ||") | ||
meta=$(grep '// Version metadata to append' < params/version.go | sed "s|//.*||" | sed "s|.* = ||") | ||
src_version=$(echo "v$major.$minor.$patch-$meta" | tr -d '\t" ') | ||
if [ "$src_version" != "$changelog_version" ]; then | ||
echo "Version in params/version.go ($src_version) is not aligned with CHANGELOG.md ($changelog_version)" | ||
exit 1 | ||
fi | ||
echo "Version in params/version.go is aligned with CHANGELOG.md ($changelog_version)" |
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 |
---|---|---|
|
@@ -8,6 +8,18 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
invariants: | ||
name: Invariants | ||
runs-on: ubuntu-20-04-4-cores | ||
timeout-minutes: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Invariants | ||
shell: bash | ||
run: ./.github/scripts/invariants.sh | ||
- name: TruffleHog OSS | ||
uses: trufflesecurity/[email protected] | ||
|
||
bootstrap: | ||
name: Local E2E Tests | ||
runs-on: ubuntu-20-04-4-cores | ||
|