Skip to content

Add flaky test detection github workflow #14

Add flaky test detection github workflow

Add flaky test detection github workflow #14

name: "Flaky test detection"
on:
pull_request:
push:
branches:
- 'main'
#on:
# # Allow manual triggering via the GitHub UI
# workflow_dispatch:
# # Run the workflow every 4 hours
# schedule:
# - cron: "0 */4 * * *"
jobs:
flaky-test-detection:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: ['1.22']
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Run tests 50 times.
run: |
TEST_COUNT=50 make test
exit 1
- name: Notify the team by commenting on latest commit
if: failure()
run: |
response=$(curl -X POST -H 'Content-type: application/json' \
--data '{"text": "This is a test - Flaky tests detected in chainlink-ccip repository.", "channel": "#ccip-pod-offchain"}' \
${{ secrets.SLACK_WEBHOOK_URL }})