Skip to content
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

Add nightly flaky test finder #1499

Merged
merged 17 commits into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/deflake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deflake
on:
schedule:
- cron: '22 18 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
~/.kubebuilder/bin/k8s
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }}
- name: Running tests 10 times to find flaky tests
run: |
make toolchain
make deflake
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ ci: toolchain verify licenses battletest ## Run all steps used by continuous int
test: ## Run tests
ginkgo -r

battletest: ## Run stronger tests
strongertests:
# Run randomized, parallelized, racing, code coveraged, tests
ginkgo -r \
-cover -coverprofile=coverage.out -outputdir=. -coverpkg=./pkg/... \
--randomizeAllSpecs --randomizeSuites -race
-cover -coverprofile=coverage.out -outputdir=. -coverpkg=./pkg/... \
--randomizeAllSpecs --randomizeSuites -race

deflake:
for i in {1..10}; do make strongertests; done
spring1843 marked this conversation as resolved.
Show resolved Hide resolved

battletest: strongertests
go tool cover -html coverage.out -o coverage.html
spring1843 marked this conversation as resolved.
Show resolved Hide resolved

verify: codegen ## Verify code. Includes dependencies, linting, formatting, etc
Expand Down