Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1784771

Browse files
committed
Merge branch 'main' into 5574-validation-rules
2 parents f655603 + 6a245ab commit 1784771

39 files changed

+1870
-507
lines changed

.github/workflows/coder.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ jobs:
215215

216216
- name: Install sqlc
217217
run: |
218-
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.13.0/sqlc_1.13.0_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
218+
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.16.0/sqlc_1.16.0_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
219219
- name: Install protoc-gen-go
220220
run: go install google.golang.org/protobuf/cmd/[email protected]
221221
- name: Install protoc-gen-go-drpc

.github/workflows/release.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ jobs:
253253
retention-days: 7
254254

255255
publish-winget:
256+
name: Publish to winget-pkgs
256257
runs-on: windows-latest
257258
needs: release
258259
steps:
@@ -308,18 +309,22 @@ jobs:
308309
--submit `
309310
--version "${version}" `
310311
--urls "${installer_url}|X64" `
311-
--token "${{ secrets.CDRCI_GITHUB_TOKEN }}"
312+
--token "$env:WINGET_GH_TOKEN"
312313
313314
env:
314315
# For gh CLI:
315316
GH_TOKEN: ${{ github.token }}
317+
# For wingetcreate. We need a real token since we're pushing a commit
318+
# to GitHub and then making a PR in a different repo.
319+
WINGET_GH_TOKEN: ${{ secrets.CDRCI_GITHUB_TOKEN }}
316320

317321
- name: Comment on PR
322+
if: ${{ !inputs.dry_run }}
318323
run: |
319324
# Find the PR that wingetcreate just made.
320325
$version = "${{ needs.release.outputs.version }}".Trim('v')
321326
$pr_list = gh pr list --repo microsoft/winget-pkgs --search "author:cdrci Coder.Coder version ${version}" --limit 1 --json number | `
322-
ConvertFrom-Json`
327+
ConvertFrom-Json
323328
$pr_number = $pr_list[0].number
324329
325330
gh pr comment --repo microsoft/winget-pkgs "${pr_number}" --body "🤖 cc: @deansheather @matifali"

agent/agent_test.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,16 @@ func TestAgent_GitSSH(t *testing.T) {
133133

134134
func TestAgent_SessionTTYShell(t *testing.T) {
135135
t.Parallel()
136+
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
137+
t.Cleanup(cancel)
136138
if runtime.GOOS == "windows" {
137139
// This might be our implementation, or ConPTY itself.
138140
// It's difficult to find extensive tests for it, so
139141
// it seems like it could be either.
140142
t.Skip("ConPTY appears to be inconsistent on Windows.")
141143
}
142144
session := setupSSHSession(t, codersdk.WorkspaceAgentMetadata{})
143-
command := "bash"
145+
command := "sh"
144146
if runtime.GOOS == "windows" {
145147
command = "cmd.exe"
146148
}
@@ -152,11 +154,7 @@ func TestAgent_SessionTTYShell(t *testing.T) {
152154
session.Stdin = ptty.Input()
153155
err = session.Start(command)
154156
require.NoError(t, err)
155-
caret := "$"
156-
if runtime.GOOS == "windows" {
157-
caret = ">"
158-
}
159-
ptty.ExpectMatch(caret)
157+
_ = ptty.Peek(ctx, 1) // wait for the prompt
160158
ptty.WriteLine("echo test")
161159
ptty.ExpectMatch("test")
162160
ptty.WriteLine("exit")

0 commit comments

Comments
 (0)