Skip to content

Commit 122ff73

Browse files
committed
Merge branch 'main' into dean/ticket-provider
2 parents 21af599 + e0f7f01 commit 122ff73

File tree

253 files changed

+13024
-2473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+13024
-2473
lines changed

.github/workflows/ci.yaml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
uses: actions/checkout@v3
3636

3737
# Install Go!
38-
- uses: actions/setup-go@v3
38+
- uses: actions/setup-go@v4
3939
with:
4040
go-version: "~1.20"
4141

4242
# Check for any typos!
4343
- name: Check for typos
44-
uses: crate-ci/typos@v1.13.14
44+
uses: crate-ci/typos@v1.14.3
4545
with:
4646
config: .github/workflows/typos.toml
4747
- name: Fix the typos
@@ -150,7 +150,7 @@ jobs:
150150
- name: Install node_modules
151151
run: ./scripts/yarn_install.sh
152152

153-
- uses: actions/setup-go@v3
153+
- uses: actions/setup-go@v4
154154
with:
155155
go-version: "~1.20"
156156

@@ -174,7 +174,7 @@ jobs:
174174

175175
- name: Install sqlc
176176
run: |
177-
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
177+
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.17.2/sqlc_1.17.2_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
178178
- name: Install protoc-gen-go
179179
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
180180
- name: Install protoc-gen-go-drpc
@@ -250,18 +250,15 @@ jobs:
250250
steps:
251251
- uses: actions/checkout@v3
252252

253-
- uses: actions/setup-go@v3
253+
- uses: actions/setup-go@v4
254254
with:
255255
go-version: "~1.20"
256256

257-
# Sadly the new "set output" syntax (of writing env vars to
258-
# $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
259-
# deprecated syntax here.
260257
- name: Echo Go Cache Paths
261258
id: go-cache-paths
262259
run: |
263-
echo "::set-output name=GOCACHE::$(go env GOCACHE)"
264-
echo "::set-output name=GOMODCACHE::$(go env GOMODCACHE)"
260+
echo "GOCACHE=$(go env GOCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
261+
echo "GOMODCACHE=$(go env GOMODCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
265262
266263
- name: Go Build Cache
267264
uses: actions/cache@v3
@@ -276,7 +273,7 @@ jobs:
276273
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
277274

278275
- name: Install gotestsum
279-
uses: jaxxstorm/action-install-gh-release@v1.9.0
276+
uses: jaxxstorm/action-install-gh-release@v1.10.0
280277
env:
281278
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
282279
with:
@@ -302,7 +299,14 @@ jobs:
302299
echo "cover=false" >> $GITHUB_OUTPUT
303300
fi
304301
305-
gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=7m -short -failfast $COVERAGE_FLAGS
302+
gotestsum --junitfile="gotests.xml" --jsonfile="gotests.json" --packages="./..." -- -parallel=8 -timeout=7m -short -failfast $COVERAGE_FLAGS
303+
304+
- name: Print test stats
305+
if: success() || failure()
306+
run: |
307+
# Artifacts are not available after rerunning a job,
308+
# so we need to print the test stats to the log.
309+
go run ./scripts/ci-report/main.go gotests.json | tee gotests_stats.json
306310
307311
- uses: actions/upload-artifact@v3
308312
if: success() || failure()
@@ -333,7 +337,7 @@ jobs:
333337
steps:
334338
- uses: actions/checkout@v3
335339

336-
- uses: actions/setup-go@v3
340+
- uses: actions/setup-go@v4
337341
with:
338342
go-version: "~1.20"
339343

@@ -356,7 +360,7 @@ jobs:
356360
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
357361

358362
- name: Install gotestsum
359-
uses: jaxxstorm/action-install-gh-release@v1.9.0
363+
uses: jaxxstorm/action-install-gh-release@v1.10.0
360364
env:
361365
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
362366
with:
@@ -372,6 +376,13 @@ jobs:
372376
run: |
373377
make test-postgres
374378
379+
- name: Print test stats
380+
if: success() || failure()
381+
run: |
382+
# Artifacts are not available after rerunning a job,
383+
# so we need to print the test stats to the log.
384+
go run ./scripts/ci-report/main.go gotests.json | tee gotests_stats.json
385+
375386
- uses: actions/upload-artifact@v3
376387
if: success() || failure()
377388
with:
@@ -416,7 +427,7 @@ jobs:
416427
- name: Set up Google Cloud SDK
417428
uses: google-github-actions/setup-gcloud@v1
418429

419-
- uses: actions/setup-go@v3
430+
- uses: actions/setup-go@v4
420431
with:
421432
go-version: "~1.20"
422433

@@ -545,7 +556,7 @@ jobs:
545556
.eslintcache
546557
key: js-${{ runner.os }}-e2e-${{ hashFiles('**/yarn.lock') }}
547558

548-
- uses: actions/setup-go@v3
559+
- uses: actions/setup-go@v4
549560
with:
550561
go-version: "~1.20"
551562

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
username: ${{ github.actor }}
9191
password: ${{ secrets.GITHUB_TOKEN }}
9292

93-
- uses: actions/setup-go@v3
93+
- uses: actions/setup-go@v4
9494
with:
9595
go-version: "~1.20"
9696

.github/workflows/security.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
languages: go, javascript
3131

3232
- name: Setup Go
33-
uses: actions/setup-go@v3
33+
uses: actions/setup-go@v4
3434
with:
3535
go-version: "~1.20"
3636

@@ -71,7 +71,7 @@ jobs:
7171
with:
7272
fetch-depth: 0
7373

74-
- uses: actions/setup-go@v3
74+
- uses: actions/setup-go@v4
7575
with:
7676
go-version: "~1.20"
7777

@@ -137,7 +137,7 @@ jobs:
137137
echo "image=$(cat "$image_job")" >> $GITHUB_OUTPUT
138138
139139
- name: Run Trivy vulnerability scanner
140-
uses: aquasecurity/trivy-action@8bd2f9fbda2109502356ff8a6a89da55b1ead252
140+
uses: aquasecurity/trivy-action@1f0aa582c8c8f5f7639610d6d38baddfea4fdcee
141141
with:
142142
image-ref: ${{ steps.build.outputs.image }}
143143
format: sarif

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
issues: write
1212
pull-requests: write
1313
steps:
14-
- uses: actions/stale@v7.0.0
14+
- uses: actions/stale@v8.0.0
1515
with:
1616
stale-issue-label: "stale"
1717
stale-pr-label: "stale"

.github/workflows/typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ extend-exclude = [
2424
# These files contain base64 strings that confuse the detector
2525
"**XService**.ts",
2626
"**identity.go",
27+
"scripts/ci-report/testdata/**",
2728
]

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
**/*.swp
77
gotests.coverage
88
gotests.xml
9-
gotestsum.json
9+
gotests_stats.json
10+
gotests.json
1011
node_modules/
1112
vendor/
1213
yarn-error.log
@@ -29,9 +30,8 @@ site/e2e/states/*.json
2930
site/playwright-report/*
3031
site/.swc
3132

32-
# Make target for updating golden files.
33-
cli/testdata/.gen-golden
34-
helm/tests/testdata/.gen-golden
33+
# Make target for updating golden files (any dir).
34+
.gen-golden
3535

3636
# Build
3737
/build/

.prettierignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
**/*.swp
1010
gotests.coverage
1111
gotests.xml
12-
gotestsum.json
12+
gotests_stats.json
13+
gotests.json
1314
node_modules/
1415
vendor/
1516
yarn-error.log
@@ -32,9 +33,8 @@ site/e2e/states/*.json
3233
site/playwright-report/*
3334
site/.swc
3435

35-
# Make target for updating golden files.
36-
cli/testdata/.gen-golden
37-
helm/tests/testdata/.gen-golden
36+
# Make target for updating golden files (any dir).
37+
.gen-golden
3838

3939
# Build
4040
/build/

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"pqtype",
9191
"prometheusmetrics",
9292
"promhttp",
93-
"promptui",
9493
"protobuf",
9594
"provisionerd",
9695
"provisionerdserver",

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS)
514514
./scripts/apidocgen/generate.sh
515515
yarn run --cwd=site format:write:only ../docs/api ../docs/manifest.json ../coderd/apidoc/swagger.json
516516

517-
update-golden-files: cli/testdata/.gen-golden helm/tests/testdata/.gen-golden
517+
update-golden-files: cli/testdata/.gen-golden helm/tests/testdata/.gen-golden scripts/ci-report/testdata/.gen-golden
518518
.PHONY: update-golden-files
519519

520520
cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES)
@@ -525,6 +525,10 @@ helm/tests/testdata/.gen-golden: $(wildcard helm/tests/testdata/*.golden) $(GO_S
525525
go test ./helm/tests -run=TestUpdateGoldenFiles -update
526526
touch "$@"
527527

528+
scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*) $(wildcard scripts/ci-report/*.go)
529+
go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update
530+
touch "$@"
531+
528532
# Generate a prettierrc for the site package that uses relative paths for
529533
# overrides. This allows us to share the same prettier config between the
530534
# site and the root of the repo.
@@ -596,6 +600,7 @@ test-postgres: test-clean test-postgres-docker
596600
# more consistent execution.
597601
DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \
598602
--junitfile="gotests.xml" \
603+
--jsonfile="gotests.json" \
599604
--packages="./..." -- \
600605
-covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \
601606
-parallel=4 \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ coder server --postgres-url <url> --access-url <url>
8484

8585
> <sup>1</sup> For production deployments, set up an external PostgreSQL instance for reliability.
8686
87-
Use `coder --help` to get a list of flags and environment variables. Use our [quickstart guide](https://coder.com/docs/v2/latest/quickstart) for a full walkthrough.
87+
Use `coder --help` to get a list of flags and environment variables. Use our [install guides](https://coder.com/docs/v2/latest/guides) for a full walkthrough.
8888

8989
## Documentation
9090

0 commit comments

Comments
 (0)