-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: run nightly bank test #1816
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b7365e4
add nightly workflow
joshua-goldstein 058d378
fix typo
joshua-goldstein 7607005
Update ci-badger-bank-nightly.yml
joshua-goldstein 4d3a9b2
tmp commit to check encryption
joshua-goldstein 065894b
fix duration
joshua-goldstein fd8d531
update title
joshua-goldstein bd7cd71
change file name
joshua-goldstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,46 @@ | ||
name: ci-badger-bank-nightly | ||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 3 * * *" | ||
jobs: | ||
badger-bank: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get Go Version | ||
run: | | ||
#!/bin/bash | ||
GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) | ||
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GOVERSION }} | ||
- name: Install Dependencies | ||
run: make dependency | ||
- name: Install jemalloc | ||
run: make jemalloc | ||
- name: Install Badger | ||
run: cd badger && go install --race --tags=jemalloc . | ||
- name: Run Badger Bank Test | ||
run: | | ||
#!/bin/bash -x | ||
set -o pipefail | ||
# get 16 random bytes from /dev/urandom | ||
hexdump -vn16 -e'4/4 "%08X" 1 "\n"' /dev/urandom > badgerkey16bytes | ||
badger bank test --dir=. --encryption-key "badgerkey16bytes" -d=4h 2>&1 | tee badgerbanktest.log | grep -v 'Moved $5' | ||
if [ $? -ne 0 ]; then | ||
if grep -qi 'data race' badgerbanktest.log; then | ||
echo "Detected data race via grep..." | ||
cat badgerbanktest.log | grep -v 'Moved $5' | ||
else | ||
echo "No data race detected via grep. Assuming txn violation..." | ||
tail -1000 badgerbanktest.log | ||
badger bank disect --dir=. --decryption-key "badgerkey16bytes" | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should move this block into the make file under |
||
exit 1 | ||
fi | ||
echo 'Bank test finished with no issues.' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjust the names