5
0
Fork 0
mirror of https://github.com/actions/setup-go.git synced 2025-12-27 08:58:17 +00:00
setup-go/__tests__
Arne Jørgensen 9fbf6fbc10
Add support for rc and beta versions in go.mod file
The regex in `parseGoVersionFile()` didn't consider rc and beta
versions. The regex has been extended.

In `findMatch()` the match is checked using `semver.satisfies()`. But
`semver.satisfies()` doesn't no about Go's non-semver rc and beta
version formats (1.16c1 instead of 1.16.0-rc.1).

We cannot use `makeSemver()` on `versionSpec` and compare the result
using `semver.satisfies()` because `versionSpec` could be, well, a
spec. Instead we first check if there is a strict match between the
candidate version and the versionSpec.

Fixes #525.
2025-12-18 10:28:45 +01:00
..
data Add support for rc and beta versions in go.mod file 2025-12-18 10:28:45 +01:00
cache-restore.test.ts Add and configure ESLint and update configuration for Prettier (#341) 2023-03-08 10:45:16 +02:00
cache-utils.test.ts Revise isGhes logic (#511) 2024-10-21 11:56:08 -05:00
setup-go.test.ts Add support for rc and beta versions in go.mod file 2025-12-18 10:28:45 +01:00
utils.test.ts Update self-hosted environment validation and bump undici version (#556) 2025-04-01 10:32:30 -05:00
verify-go.sh Use GitHub releases to download Go versions. (#58) 2020-06-29 11:41:13 -04:00
windows-toolcache.test.ts Fix Install on Windows is very slow (#393) 2023-08-03 14:33:56 +02:00