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

test: Speed up tests by using smaller test data. #210

Conversation

erikgeiser
Copy link
Member

This pull requests replaces the test Go binary testdata/fake (1012K) with the simple shell script containing echo test (4k). This results in faster tests as measured without caching (the test caching can be disabled with -count=1):

This table depicts the speedup on my MacBook 13":

Test Durations Large File (Go Binary) Small File (Shell Script)
Without Acceptance* 4.33s 2.89s
With Acceptance** 6:18m 4:58m

*: time go test ./... -count=1
**: time make -e TEST_OPTIONS="-tags=acceptance -count=1" test

@vercel
Copy link

vercel bot commented Aug 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goreleaser/nfpm/jxiuks2yg
✅ Preview: https://nfpm-git-fork-erikgeiser-fix-speed-up-tests-b-481942.goreleaser.vercel.app

@vercel vercel bot temporarily deployed to Preview August 17, 2020 16:14 Inactive
@caarlos0
Copy link
Member

I think this PR is missing the new script? 🤔

@erikgeiser
Copy link
Member Author

I think GitHub just displays it weirdly because it was a binary before. Click Files changed, then ... (on the right) and then View File. Otherwise the tests would fail.

@caarlos0
Copy link
Member

oh, yeah, gitattrs

thanks!

@caarlos0 caarlos0 merged commit b76edbd into goreleaser:master Aug 17, 2020
@caarlos0
Copy link
Member

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@goreleaser goreleaser locked as resolved and limited conversation to collaborators Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants