Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
feat(actions): fuzz testing
Browse files Browse the repository at this point in the history
  • Loading branch information
corduroybera committed Oct 20, 2023
1 parent d49ee37 commit a61a6d5
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,52 @@ jobs:
run: make test-${{ matrix.namespace }}
env:
GOPATH: /home/runner/go

fuzz:
needs: build-localnet
strategy:
matrix:
os: [polaris-linux-latest]
go-version: [1.21.3]
base-image: [localnet]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Download image artifact
uses: actions/download-artifact@v2
with:
name: ${{ matrix.base-image }}
- name: Load image
run: docker load -i ${{ matrix.base-image }}.tar
- name: Checkout tx-fuzz
uses: actions/checkout@v3
with:
repository: corduroybera/tx-fuzz
path: txfuzz
token: ${{ secrets.CORDUROY_PAT }}
ref: master
- name: Start Node
shell: bash {0}
continue-on-error: true
run: |
nohup make start < /dev/null &
sleep 10
cd txfuzz/cmd/livefuzzer
go build
timeout 180s ./livefuzzer spam --sk=${{secrets.SECRET_KEY}} --txtimeout=6 --blocktime=1
if [ $? -eq 124 ]; then
echo "Fuzz successful."
echo "FUZZ_SUCCESS=true" >> $GITHUB_ENV
else
echo "Error occurred while fuzzing."
echo "FUZZ_SUCCESS=false" >> $GITHUB_ENV
fi
- name: Check success
run: |
if [ "$FUZZ_SUCCESS" == "false" ]; then
exit 1
fi

0 comments on commit a61a6d5

Please sign in to comment.