You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.0 KiB

  1. # Runs fuzzing nightly.
  2. name: fuzz-nightly
  3. on:
  4. workflow_dispatch: # allow running workflow manually
  5. schedule:
  6. - cron: '0 3 * * *'
  7. jobs:
  8. fuzz-nightly-test:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/setup-go@v2
  12. with:
  13. go-version: '1.15'
  14. - uses: actions/checkout@v2
  15. - name: Install go-fuzz
  16. working-directory: test/fuzz
  17. run: go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
  18. - name: Fuzz mempool
  19. working-directory: test/fuzz
  20. run: timeout 10m make fuzz-mempool
  21. - name: Fuzz p2p-addrbook
  22. working-directory: test/fuzz
  23. run: timeout 10m make fuzz-p2p-addrbook
  24. - name: Fuzz p2p-pex
  25. working-directory: test/fuzz
  26. run: timeout 10m make fuzz-p2p-pex
  27. - name: Fuzz p2p-sc
  28. working-directory: test/fuzz
  29. run: timeout 10m make fuzz-p2p-sc
  30. - name: Fuzz p2p-rpc-server
  31. working-directory: test/fuzz
  32. run: timeout 10m make fuzz-rpc-server
  33. - name: Set crashers count
  34. working-directory: test/fuzz
  35. run: echo "::set-output name=crashers-count::$(find . -type d -name "crashers" | xargs -I % sh -c 'ls % | wc -l' | awk '{total += $1} END {print total}')"
  36. id: set-crashers-count
  37. outputs:
  38. crashers_count: ${{ steps.set-crashers-count.outputs.crashers-count }}
  39. fuzz-nightly-fail:
  40. needs: fuzz-nightly-test
  41. if: ${{ needs.set-crashers-count.outputs.crashers-count != 0 }}
  42. runs-on: ubuntu-latest
  43. steps:
  44. - name: Notify Slack if any crashers
  45. uses: rtCamp/action-slack-notify@ae4223259071871559b6e9d08b24a63d71b3f0c0
  46. env:
  47. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
  48. SLACK_CHANNEL: tendermint-internal
  49. SLACK_USERNAME: Nightly Fuzz Tests
  50. SLACK_ICON_EMOJI: ':firecracker:'
  51. SLACK_COLOR: danger
  52. SLACK_MESSAGE: Crashers found in Nightly Fuzz tests
  53. SLACK_FOOTER: ''