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

Run all tests for a Workspace with One command (Proposal) #51756

Closed
zacharyjones123 opened this issue Mar 17, 2022 · 1 comment
Closed

Run all tests for a Workspace with One command (Proposal) #51756

zacharyjones123 opened this issue Mar 17, 2022 · 1 comment

Comments

@zacharyjones123
Copy link

Problem

I currently have a project with multiple modules. I'm using the new workspace feature in 1.18 and it works fantastically for getting dependencies and organizing my workflow better. One issue I'm having is actually testing all of the different modules at the same time.

go.work

go 1.18

use (
	./example
	./example/template
	./hello
	./hello/something
)

Given my current go.work above, I can test manually by running each of the use directories separately

How I run tests manually

go test ./example
go test ./example/template
go test ./hello
go test ./hello/something

Proposed Solution

Have a single command that will run all of the tests for your given workspace.

There is currently a -workfile flag but I can't for the life of me find documentation or how to get that working.

My attempt at getting -workfile flag working

-  go-go-go git:(main) ✗ go test -workfile=go.work
no Go files in /Users/zachajon/Projects/delete_later/go-go-go

I'm completely open to all feedback and help that can be given! This is my first time posting an issue to an open source project like this and I'm nervous and super excited!!!

@seankhliao
Copy link
Member

Duplicate of #50745

@seankhliao seankhliao marked this as a duplicate of #50745 Mar 17, 2022
@golang golang locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants