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 go_test_changes resource to Tiltfile #5231

Merged
merged 7 commits into from
Dec 2, 2021
Merged

Conversation

nicksieger
Copy link
Member

@nicksieger nicksieger commented Nov 29, 2021

Adds a local resource to run tests in recently changed go packages. Uses a new makefile target to run go test with the most recent set of changes reported by Tilt.

  • Makefile: add 'testchanges' which checks Tilt for changed pkgs
  • Tiltfile: remove unused code
  • Tiltfile: add go_test_changed resource

@nicksieger nicksieger changed the title Add go_test_changed resource to Tiltfile Add go_test_changes resource to Tiltfile Nov 29, 2021
Copy link
Member

@nicks nicks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat!

@@ -47,6 +47,22 @@ test: test-go test-js
shorttest:
go test -mod vendor -p $(GO_PARALLEL_JOBS) -short -tags skipcontainertests,skiplargetiltfiletests -timeout 100s ./...

# Run recent changes as seen by Tilt, called from Tiltfile
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make more sense to do this in a shell script?

i feel like i've gotten in trouble with stuff that slows down evaluation of the makefile -- and there doesn't seem to be a strong reason to do it in the makefile.

this is fine too though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compromise in 09ff0bb that only makes the target visible if run from inside Tilt/Tiltfile so that regular make commands are unaffected by the extra processing?

@nicksieger nicksieger merged commit 0b5302c into master Dec 2, 2021
@nicksieger nicksieger deleted the nicksieger/testchanges branch December 2, 2021 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants