Skip to content

Update windows runner to 2025 #3705

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

Merged
merged 27 commits into from
Aug 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
89723ae
Update windows runner to 2025
Naatan Aug 11, 2025
33ddc91
Simplify assertion, avoiding encoding issues
Naatan Aug 11, 2025
abaee95
Give more time cause Windows
Naatan Aug 11, 2025
c1c200d
Add error info
Naatan Aug 12, 2025
7b1dc20
Increase timeout
Naatan Aug 12, 2025
2f96937
Include logs in test failure
Naatan Aug 13, 2025
d0e9c52
Test if signing works
Naatan Aug 13, 2025
d3d4ec3
Determine SDK version
Naatan Aug 13, 2025
59d2471
Attempt find to locate signtool
Naatan Aug 13, 2025
a7f77df
Update windows kit path, find wix path
Naatan Aug 13, 2025
74d8971
Fix paths
Naatan Aug 13, 2025
58065fc
Specify newly required flag
Naatan Aug 13, 2025
499f44e
Disable signing on non release branches again
Naatan Aug 13, 2025
a92547f
Debug tests
Naatan Aug 14, 2025
268862a
Mark TestAttempts as critical
Naatan Aug 14, 2025
565318b
Fix test failure on windows due to whitespace
Naatan Aug 14, 2025
0a5cdd4
Change windows host to windows-2022
Naatan Aug 15, 2025
54f2614
Revert "Change windows host to windows-2022"
Naatan Aug 18, 2025
cdb049b
Focus debugging on single test, due to verbosity
Naatan Aug 18, 2025
d12085d
Fix unused import
Naatan Aug 18, 2025
91c7baf
Drop termtest logging
Naatan Aug 18, 2025
1d3322a
Fix test
Naatan Aug 18, 2025
12a4e99
Debug test with termtest logging
Naatan Aug 18, 2025
5fc8c58
Run with dotprogress to reduce log size
Naatan Aug 18, 2025
6604edd
Update termtest to version that strips out bell character
Naatan Aug 19, 2025
09f7c70
Update termtest to support partial cleanups
Naatan Aug 20, 2025
7301bd9
Drop debug label
Naatan Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
go-version:
- 1.23.8
sys:
- {os: ubuntu-latest}
- {os: macos-13, shell: zsh}
- {os: macos-latest, shell: zsh}
- {os: windows-2019}
- {os: ubuntu-24.04-arm}
- { os: ubuntu-latest }
- { os: macos-13, shell: zsh }
- { os: macos-latest, shell: zsh }
- { os: windows-2025 }
- { os: ubuntu-24.04-arm }
fail-fast: false
runs-on: ${{ matrix.sys.os }}
env:
Expand Down Expand Up @@ -249,13 +249,13 @@ jobs:
shell: bash
if: runner.os == 'Windows' && contains(fromJSON('["refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref)
run: |
export PATH=/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/10.0.16299.0/x86/:$PATH
export PATH=/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/10.0.26100.0/x64:$PATH

signtool.exe sign -d "ActiveState State Tool" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state.exe
signtool.exe sign -d "ActiveState State Service" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-svc.exe
signtool.exe sign -d "ActiveState State Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-installer.exe
signtool.exe sign -d "ActiveState State Tool Remote Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-remote-installer.exe
signtool.exe sign -d "ActiveState State MCP" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-mcp.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Tool" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Service" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-svc.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-installer.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Tool Remote Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-remote-installer.exe
signtool.exe sign -fd SHA1 -d "ActiveState State MCP" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-mcp.exe
env:
CODE_SIGNING_PASSWD: ${{ secrets.CODE_SIGNING_PASSWD }}

Expand Down Expand Up @@ -536,5 +536,5 @@ jobs:
session-build-ubuntu-latest
session-build-macos-13
session-build-macos-latest
session-build-windows-2019
session-build-windows-2025
session-build-ubuntu-24.04-arm
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.23.7
require (
github.com/99designs/gqlgen v0.17.54
github.com/ActiveState/go-ogle-analytics v0.0.0-20170510030904-9b3f14901527
github.com/ActiveState/termtest v0.7.3-0.20240703202616-34f7899287a4
github.com/ActiveState/termtest v0.7.3-0.20250820165828-792af935fc74
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
github.com/alecthomas/participle/v2 v2.0.0
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ github.com/ActiveState/go-ogle-analytics v0.0.0-20170510030904-9b3f14901527 h1:l
github.com/ActiveState/go-ogle-analytics v0.0.0-20170510030904-9b3f14901527/go.mod h1:/9SyzKLlJSuIa7WAsLUUhHqTK9+PtZD8cKF8G4SLpa0=
github.com/ActiveState/pty v0.0.0-20230628221854-6fb90eb08a14 h1:RdhhSiwmgyUaaF2GBNrbqTwE5SM+MaVjwf91Ua+CK8c=
github.com/ActiveState/pty v0.0.0-20230628221854-6fb90eb08a14/go.mod h1:5mM6vNRQwshCjlkOnVpwC//4ZpkiC6nmZr8lPOxJdXs=
github.com/ActiveState/termtest v0.7.3-0.20240703202616-34f7899287a4 h1:aYm+l6fT6sg+xEfO2+uSt0UJqw7WECwwqvSR7zaL/yI=
github.com/ActiveState/termtest v0.7.3-0.20240703202616-34f7899287a4/go.mod h1:RyWp2NaaTrVAa+XjMHpKAqwBFWbL6wE12HQxiZNGAqU=
github.com/ActiveState/termtest v0.7.3-0.20250820165828-792af935fc74 h1:bhx0C9Mh/03X/uHPBTZfv6Y2Js1ix0bT17qDDxaoTYk=
github.com/ActiveState/termtest v0.7.3-0.20250820165828-792af935fc74/go.mod h1:RyWp2NaaTrVAa+XjMHpKAqwBFWbL6wE12HQxiZNGAqU=
github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
Expand Down
2 changes: 1 addition & 1 deletion internal/runbits/runtime/progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func NewRuntimeProgressIndicator(out output.Outputer) events.Handler {
if out.Type() != output.PlainFormatName {
w = nil
}
if out.Config().Interactive {
if os.Getenv("DOTPROGRESS") == "" && out.Config().Interactive {
return newProgressIndicator(w, out)
}
return newDotProgressIndicator(out)
Expand Down
6 changes: 3 additions & 3 deletions internal/runners/clean/run_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ func (u *Uninstall) runUninstall(params *UninstallParams) error {
logFile, err := os.CreateTemp("", "state-clean-uninstall")
if err != nil {
logging.Error("Could not create temporary log file: %s", errs.JoinMessage(err))
aggErr = locale.WrapError(aggErr, "err_clean_logfile", "Could not create temporary log file")
aggErr = locale.WrapError(aggErr, "err_clean_logfile", "Could not create temporary log file: {{.V0}}", err.Error())
}

stateExec, err := installation.StateExec()
if err != nil {
logging.Debug("Could not get State Tool executable: %s", errs.JoinMessage(err))
aggErr = locale.WrapError(aggErr, "err_state_exec")
aggErr = locale.WrapError(aggErr, "err_state_exec_with_error", "Could not get State Tool executable: {{.V0}}", err.Error())
}

err = removeInstall(logFile.Name(), params, u.cfg)
if err != nil {
logging.Debug("Could not remove installation: %s", errs.JoinMessage(err))
aggErr = locale.WrapError(aggErr, "uninstall_remove_executables_err", "Failed to remove all State Tool files in installation directory {{.V0}}", filepath.Dir(stateExec))
aggErr = locale.WrapError(aggErr, "uninstall_remove_executables_err", "Failed to remove all State Tool files in installation directory {{.V0}}: {{.V1}}", filepath.Dir(stateExec), err.Error())
}

err = removeApp()
Expand Down
1 change: 1 addition & 0 deletions internal/testhelpers/tagsuite/tagsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
Config = "config"
Critical = "critical"
Cve = "cve"
Debug = "debug"
DeleteProjects = "delete-uuid-projects"
Deploy = "deploy"
Edit = "edit"
Expand Down
9 changes: 6 additions & 3 deletions test/integration/analytics_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import (
"testing"
"time"

"github.com/ActiveState/termtest"
"github.com/thoas/go-funk"

"github.com/ActiveState/cli/internal/runbits/runtime/trigger"
"github.com/ActiveState/cli/internal/testhelpers/suite"
"github.com/thoas/go-funk"

"github.com/ActiveState/cli/internal/analytics/client/sync/reporters"
anaConst "github.com/ActiveState/cli/internal/analytics/constants"
Expand Down Expand Up @@ -463,7 +465,7 @@ func (suite *AnalyticsIntegrationTestSuite) TestInputError() {
}

func (suite *AnalyticsIntegrationTestSuite) TestAttempts() {
suite.OnlyRunForTags(tagsuite.Analytics)
suite.OnlyRunForTags(tagsuite.Critical, tagsuite.Analytics)

ts := e2e.New(suite.T(), false)
defer ts.Close()
Expand All @@ -473,7 +475,8 @@ func (suite *AnalyticsIntegrationTestSuite) TestAttempts() {
cp := ts.SpawnWithOpts(
e2e.OptArgs("activate", "ActiveState-CLI/Alternate-Python"),
e2e.OptWD(ts.Dirs.Work),
e2e.OptAppendEnv(constants.DisableActivateEventsEnvVarName+"=false"),
e2e.OptAppendEnv(constants.DisableActivateEventsEnvVarName+"=false", "DOTPROGRESS=true"),
e2e.OptTermTest(termtest.OptVerboseLogger()),
)

cp.Expect("Creating a Virtual Environment")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/branch_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (suite *BranchIntegrationTestSuite) TestBranch_List() {

ts.PrepareProject("ActiveState-CLI/Branches", "35af7414-b44b-4fd7-aa93-2ecad337ed2b")

cp := ts.SpawnWithOpts(e2e.OptArgs("branch"), e2e.OptTermTest(termtest.OptVerboseLogger()))
cp := ts.SpawnWithOpts(e2e.OptArgs("branch"))
// Sometimes there's a space before the line break, unsure exactly why, but hence the regex
cp.ExpectRe(`main \(Current\)\s?\n ├─ firstbranch\s?\n │ └─ firstbranchchild\s?\n │ └─ childoffirstbranchchild\s?\n ├─ secondbranch\s?\n └─ thirdbranch`, termtest.OptExpectTimeout(5*time.Second))
cp.Expect("To switch to another branch,")
Expand Down
14 changes: 7 additions & 7 deletions test/integration/errors_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ func (suite *ErrorsIntegrationTestSuite) TestTips() {
suite.OnlyRunForTags(tagsuite.Errors, tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()
ts.IgnoreLogErrors()

cp := ts.Spawn("__test", "multierror")
cp.Expect("Need More Help?")
cp.Expect("Run →")
cp.Expect("Ask For Help →")
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func (suite *ErrorsIntegrationTestSuite) TestMultiErrorWithInput() {
suite.OnlyRunForTags(tagsuite.Errors, tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()
ts.IgnoreLogErrors()

cp := ts.Spawn("__test", "multierror-input")
cp.ExpectRe(`\s+x error1.\s+\s+x error2.\s+x error3.\s+x error4.\s+█\s+Need More Help`)
cp := ts.SpawnWithOpts(e2e.OptArgs("__test", "multierror-input"))
cp.ExpectRe(`x error1.\s+\s+x error2.\s+x error3.\s+x error4.`)
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func (suite *ErrorsIntegrationTestSuite) TestMultiErrorWithoutInput() {
suite.OnlyRunForTags(tagsuite.Errors, tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()
ts.IgnoreLogErrors()

cp := ts.Spawn("__test", "multierror-noinput")
cp.ExpectRe(`\s+x error1.\s+\s+x error2.\s+x error3.\s+x error4.\s+█\s+Need More Help`)
cp := ts.SpawnWithOpts(e2e.OptArgs("__test", "multierror-noinput"))
cp.ExpectRe(`x error1.\s+\s+x error2.\s+x error3.\s+x error4.`)
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func TestErrorsIntegrationTestSuite(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions test/integration/hello_int_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func (suite *HelloIntegrationTestSuite) TestHello() {
ts.IgnoreLogErrors()

cp = ts.Spawn("_hello", "Person", "--extra")
cp.Expect("Project: ActiveState-CLI/Empty")
cp.Expect("Current commit message:")
cp.Expect("You are on commit")
cp.ExpectExitCode(0)

cp = ts.Spawn("_hello", "Person", "--echo", "example")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/shells_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (suite *ShellsIntegrationTestSuite) TestShells() {
e2e.OptAppendEnv(constants.OverrideShellEnvVarName+"="),
)
cp.SendLine(e2e.QuoteCommand(shell, ts.ExecutablePath(), "checkout", "ActiveState-CLI/small-python", string(shell)))
cp.Expect("Checked out project")
cp.Expect("Checked out project", e2e.RuntimeSourcingTimeoutOpt)
cp.SendLine("exit")
if shell != e2e.Cmd {
cp.ExpectExitCode(0)
Expand Down
16 changes: 8 additions & 8 deletions test/integration/uninstall_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ func (suite *UninstallIntegrationTestSuite) testUninstall(all bool) {
}

if all {
suite.NoDirExists(ts.Dirs.Cache, "Cache dir should not exist after full uninstall")
suite.NoDirExists(ts.Dirs.Config, "Config dir should not exist after full uninstall")
suite.NoDirExists(ts.Dirs.Cache, ts.DebugMessage("Cache dir should not exist after full uninstall"))
suite.NoDirExists(ts.Dirs.Config, ts.DebugMessage("Config dir should not exist after full uninstall"))
} else {
suite.DirExists(ts.Dirs.Cache, "Cache dir should still exist after partial uninstall")
suite.DirExists(ts.Dirs.Config, "Config dir should still exist after partial uninstall")
suite.DirExists(ts.Dirs.Cache, ts.DebugMessage("Cache dir should still exist after partial uninstall"))
suite.DirExists(ts.Dirs.Config, ts.DebugMessage("Config dir should still exist after partial uninstall"))
}

if fileutils.FileExists(stateExe) {
suite.Fail("State tool executable should not exist after uninstall")
suite.Fail(ts.DebugMessage("State tool executable should not exist after uninstall"))
}

if fileutils.FileExists(svcExe) {
suite.Fail("State service executable should not exist after uninstall")
suite.Fail(ts.DebugMessage("State service executable should not exist after uninstall"))
}

if runtime.GOOS == "linux" {
Expand All @@ -135,7 +135,7 @@ func (suite *UninstallIntegrationTestSuite) testUninstall(all bool) {

if runtime.GOOS == "darwin" {
if fileutils.DirExists(filepath.Join(binDir, "system")) {
suite.Fail("system directory should not exist after uninstall")
suite.Fail(ts.DebugMessage("system directory should not exist after uninstall"))
}
}

Expand All @@ -145,7 +145,7 @@ func (suite *UninstallIntegrationTestSuite) testUninstall(all bool) {
}

if fileutils.DirExists(binDir) {
suite.Fail("bin directory should not exist after uninstall")
suite.Fail(ts.DebugMessage("bin directory should not exist after uninstall"))
}
}

Expand Down
4 changes: 2 additions & 2 deletions vendor/github.com/ActiveState/termtest/helpers_unix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 22 additions & 7 deletions vendor/github.com/ActiveState/termtest/helpers_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading