Skip to content

Commit e9d7fa2

Browse files
committed
add needs
1 parent c881491 commit e9d7fa2

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

.github/workflows/coder.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
changes:
3434
runs-on: ubuntu-latest
3535
outputs:
36-
docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }}
36+
docs-only: ${{ env.DOCS_ONLY }}
3737
steps:
3838
# For pull requests it's not necessary to checkout the code
3939
- uses: dorny/paths-filter@v2
@@ -44,11 +44,15 @@ jobs:
4444
- '**'
4545
docs:
4646
- 'docs/**'
47-
- '.github/**'
47+
- id: log
48+
run: |
49+
echo "${{ toJSON(steps.filter) }}"
50+
echo "DOCS_ONLY=${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} >> $GITHUB_ENV"
4851
style-lint-golangci:
4952
name: style/lint/golangci
5053
timeout-minutes: 5
51-
if: ${{ !needs.changes.outputs.docs_only }}
54+
needs: changes
55+
if: needs.changes.outputs.docs_only == 'false'
5256
runs-on: ubuntu-latest
5357
steps:
5458
- uses: actions/checkout@v3
@@ -64,7 +68,8 @@ jobs:
6468
name: style/lint/shellcheck
6569
timeout-minutes: 5
6670
runs-on: ubuntu-latest
67-
if: ${{ !needs.changes.outputs.docs_only }}
71+
needs: changes
72+
if: needs.changes.outputs.docs_only == 'false'
6873
steps:
6974
- uses: actions/checkout@v3
7075
- name: Run ShellCheck
@@ -77,7 +82,8 @@ jobs:
7782
style-lint-typescript:
7883
name: "style/lint/typescript"
7984
timeout-minutes: 5
80-
if: ${{ !needs.changes.outputs.docs_only }}
85+
needs: changes
86+
if: needs.changes.outputs.docs_only == 'false'
8187
runs-on: ubuntu-latest
8288
steps:
8389
- name: Checkout
@@ -105,7 +111,8 @@ jobs:
105111
name: "style/gen"
106112
timeout-minutes: 5
107113
runs-on: ubuntu-latest
108-
if: ${{ !needs.changes.outputs.docs_only }}
114+
needs: changes
115+
if: needs.changes.outputs.docs_only == 'false'
109116
steps:
110117
- uses: actions/checkout@v3
111118

@@ -141,7 +148,8 @@ jobs:
141148

142149
style-fmt:
143150
name: "style/fmt"
144-
if: ${{ !needs.changes.outputs.docs_only }}
151+
needs: changes
152+
if: needs.changes.outputs.docs_only == 'false'
145153
runs-on: ubuntu-latest
146154
timeout-minutes: 5
147155
steps:
@@ -174,7 +182,8 @@ jobs:
174182
175183
test-go:
176184
name: "test/go"
177-
if: ${{ !needs.changes.outputs.docs_only }}
185+
needs: changes
186+
if: needs.changes.outputs.docs_only == 'false'
178187
runs-on: ${{ matrix.os }}
179188
timeout-minutes: 20
180189
strategy:
@@ -251,7 +260,8 @@ jobs:
251260

252261
test-go-postgres:
253262
name: "test/go/postgres"
254-
if: ${{ !needs.changes.outputs.docs_only }}
263+
needs: changes
264+
if: needs.changes.outputs.docs_only == 'false'
255265
runs-on: ubuntu-latest
256266
# This timeout must be greater than the timeout set by `go test` in
257267
# `make test-postgres` to ensure we receive a trace of running
@@ -323,9 +333,10 @@ jobs:
323333
name: "deploy"
324334
runs-on: ubuntu-latest
325335
timeout-minutes: 30
336+
needs: changes
326337
if: |
327338
github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
328-
&& !needs.changes.outputs.docs_only
339+
&& needs.changes.outputs.docs_only == 'false'
329340
permissions:
330341
contents: read
331342
id-token: write
@@ -431,7 +442,8 @@ jobs:
431442

432443
test-js:
433444
name: "test/js"
434-
if: ${{ !needs.changes.outputs.docs_only }}
445+
needs: changes
446+
if: needs.changes.outputs.docs_only == 'false'
435447
runs-on: ubuntu-latest
436448
timeout-minutes: 20
437449
steps:
@@ -485,6 +497,8 @@ jobs:
485497

486498
test-e2e:
487499
name: "test/e2e/${{ matrix.os }}"
500+
needs: changes
501+
if: needs.changes.outputs.docs_only == 'false'
488502
runs-on: ${{ matrix.os }}
489503
timeout-minutes: 20
490504
strategy:

cli/ssh_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ func TestSSH(t *testing.T) {
9191

9292
// Shells on Mac, Windows, and Linux all exit shells with the "exit" command.
9393
pty.WriteLine("exit")
94+
// Read output to prevent hang on macOS, see:
95+
// https://github.com/coder/coder/issues/2122
96+
pty.ExpectMatch("exit")
9497
<-cmdDone
9598
})
9699
t.Run("Stdio", func(t *testing.T) {
@@ -224,6 +227,9 @@ func TestSSH(t *testing.T) {
224227

225228
// And we're done.
226229
pty.WriteLine("exit")
230+
// Read output to prevent hang on macOS, see:
231+
// https://github.com/coder/coder/issues/2122
232+
pty.ExpectMatch("exit")
227233
<-cmdDone
228234
})
229235
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ require (
243243
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
244244
github.com/rivo/uniseg v0.2.0 // indirect
245245
github.com/sirupsen/logrus v1.8.1 // indirect
246-
github.com/spf13/afero v1.9.0
246+
github.com/spf13/afero v1.9.2
247247
github.com/spf13/cast v1.5.0 // indirect
248248
github.com/spf13/jwalterweatherman v1.1.0 // indirect
249249
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,8 +1699,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B
16991699
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
17001700
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
17011701
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
1702-
github.com/spf13/afero v1.9.0 h1:sFSLUHgxdnN32Qy38hK3QkYBFXZj9DKjVjCUCtD7juY=
1703-
github.com/spf13/afero v1.9.0/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
1702+
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
1703+
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
17041704
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
17051705
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
17061706
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=

site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dayjs.extend(timezone)
3333

3434
export const Language = {
3535
errorNoDayOfWeek: "Must set at least one day of week if start time is set",
36-
errorNoTime: "Start time is required",
36+
errorNoTime: "Start time is required when days of the week are selected",
3737
errorTime: "Time must be in HH:mm format (24 hours)",
3838
errorTimezone: "Invalid timezone",
3939
daysOfWeekLabel: "Days of Week",

0 commit comments

Comments
 (0)