You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to do something like this where the used Go versions are set automatically in matrix testing without having to manually maintain the workflows. This is very useful when having many repositories with CI/CD infrastructure set up. To minimize the versions of Go used for testing, I want to test with the latest stable and the minimum version that the project supports, i.e. I want to use stable and the version from my go.mod file.
My idea is to be able to specify something like go-version-file inside the go-version field:
Justification:
Justification or a use case for your proposal.
This is very useful when having many repositories with CI/CD infrastructure set up. To minimize the versions of Go used for testing, I want to test with the latest stable and the minimum version that the project supports, i.e. I want to use stable and the version from my go.mod file.
Are you willing to submit a PR?
Sorry. I'll let you handle this
The text was updated successfully, but these errors were encountered:
diff --git a/src/main.ts b/src/main.ts
index 690d277..2fdeb8a 100644
--- a/src/main.ts+++ b/src/main.ts@@ -133,24 +133,27 @@ export function parseGoVersion(versionString: string): string {
// fmt.Printf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
// expecting go<version> for runtime.Version()
return versionString.split(' ')[2].slice('go'.length);
}
function resolveVersionInput(): string {
let version = core.getInput('go-version');
- const versionFilePath = core.getInput('go-version-file');+ let versionFilePath = core.getInput('go-version-file');
if (version && versionFilePath) {
core.warning(
'Both go-version and go-version-file inputs are specified, only go-version will be used'
);
}
if (version) {
- return version;+ if (!version.endsWith('go.mod')) {+ return version;+ }+ versionFilePath = version;
}
if (versionFilePath) {
if (!fs.existsSync(versionFilePath)) {
throw new Error(
`The specified go version file at: ${versionFilePath} does not exist`
);
Description:
Describe your proposal.
I want to be able to do something like this where the used Go versions are set automatically in matrix testing without having to manually maintain the workflows. This is very useful when having many repositories with CI/CD infrastructure set up. To minimize the versions of Go used for testing, I want to test with the latest stable and the minimum version that the project supports, i.e. I want to use
stable
and the version from mygo.mod
file.My idea is to be able to specify something like
go-version-file
inside thego-version
field:Justification:
Justification or a use case for your proposal.
This is very useful when having many repositories with CI/CD infrastructure set up. To minimize the versions of Go used for testing, I want to test with the latest stable and the minimum version that the project supports, i.e. I want to use
stable
and the version from mygo.mod
file.Are you willing to submit a PR?
Sorry. I'll let you handle this
The text was updated successfully, but these errors were encountered: