Skip to content

Commit ee83546

Browse files
committed
Merge branch 'main' into workspace-template-tags
2 parents f867dd7 + d896b74 commit ee83546

File tree

799 files changed

+46128
-18177
lines changed

Some content is hidden

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

799 files changed

+46128
-18177
lines changed

.github/actions/setup-go/action.yaml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,68 @@
11
name: "Setup Go"
22
description: |
33
Sets up the Go environment for tests, builds, etc.
4+
inputs:
5+
version:
6+
description: "The Go version to use."
7+
default: "1.20.5"
48
runs:
59
using: "composite"
610
steps:
11+
- name: Cache go toolchain
12+
uses: buildjet/cache@v3
13+
with:
14+
path: |
15+
${{ runner.tool_cache }}/go/${{ inputs.version }}
16+
key: gotoolchain-${{ runner.os }}-${{ inputs.version }}
17+
restore-keys: |
18+
gotoolchain-${{ runner.os }}-
19+
720
- uses: buildjet/setup-go@v4
821
with:
9-
cache: true
10-
go-version: "1.20.5"
11-
- name: Install gotestsum
12-
uses: jaxxstorm/action-install-gh-release@v1.10.0
22+
# We do our own caching for implementation clarity.
23+
cache: false
24+
go-version: ${{ inputs.version }}
25+
26+
- name: Get cache dirs
27+
shell: bash
28+
run: |
29+
set -x
30+
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
31+
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
32+
33+
# We split up GOMODCACHE from GOCACHE because the latter must be invalidated
34+
# on code change, but the former can be kept.
35+
- name: Cache $GOMODCACHE
36+
uses: buildjet/cache@v3
1337
with:
14-
repo: gotestyourself/gotestsum
15-
tag: v1.9.0
38+
path: |
39+
${{ env.GOMODCACHE }}
40+
key: gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ github.job }}
41+
restore-keys: |
42+
gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-
43+
gomodcache-${{ runner.os }}-
44+
45+
- name: Cache $GOCACHE
46+
uses: buildjet/cache@v3
47+
with:
48+
path: |
49+
${{ env.GOCACHE }}
50+
# Job name must be included in the key for effective
51+
# test cache reuse.
52+
# The key format is intentionally different than GOMODCACHE, because any
53+
# time a Go file changes we invalidate this cache, whereas GOMODCACHE
54+
# is only invalidated when go.sum changes.
55+
key: gocache-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}
56+
restore-keys: |
57+
gocache-${{ runner.os }}-${{ github.job }}-
58+
gocache-${{ runner.os }}-
59+
60+
- name: Install gotestsum
61+
shell: bash
62+
run: go install gotest.tools/gotestsum@latest
63+
64+
# It isn't necessary that we ever do this, but it helps
65+
# separate the "setup" from the "run" times.
66+
- name: go mod download
67+
shell: bash
68+
run: go mod download -x

.github/actions/setup-node/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- uses: buildjet/setup-node@v3
88
with:
9-
node-version: 16.16.0
9+
node-version: 16.20.1
1010
# See https://github.com/actions/setup-node#caching-global-packages-data
1111
cache: "yarn"
1212
cache-dependency-path: "site/yarn.lock"

.github/actions/setup-tf/action.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Setup Terraform"
2+
description: |
3+
Sets up Terraform for tests, builds, etc.
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install Terraform
8+
uses: hashicorp/setup-terraform@v2
9+
with:
10+
terraform_version: 1.5.2
11+
terraform_wrapper: false

.github/actions/upload-datadog/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
echo "No API key provided, skipping..."
2121
exit 0
2222
fi
23-
npm install -g @datadog/datadog-ci
23+
npm install -g @datadog/datadog-ci@2.10.0
2424
datadog-ci junit upload --service coder ./gotests.xml \
2525
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
2626
env:

.github/dependabot.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ updates:
2424
update-types:
2525
- version-update:semver-minor
2626
- version-update:semver-patch
27+
groups:
28+
github-actions:
29+
patterns:
30+
- "*"
2731

2832
- package-ecosystem: "gomod"
2933
directory: "/"
@@ -39,6 +43,14 @@ updates:
3943
- dependency-name: "*"
4044
update-types:
4145
- version-update:semver-patch
46+
groups:
47+
go-otel:
48+
patterns:
49+
- "go.nhat.io/otelsql"
50+
- "go.opentelemetry.io/otel*"
51+
golang-x:
52+
patterns:
53+
- "golang.org/x/*"
4254

4355
# Update our Dockerfile.
4456
- package-ecosystem: "docker"
@@ -54,6 +66,10 @@ updates:
5466
# We need to coordinate terraform updates with the version hardcoded in
5567
# our Go code.
5668
- dependency-name: "terraform"
69+
groups:
70+
docker:
71+
patterns:
72+
- "*"
5773

5874
- package-ecosystem: "npm"
5975
directory: "/site/"
@@ -89,6 +105,10 @@ updates:
89105
ignore:
90106
# We likely want to update this ourselves.
91107
- dependency-name: "coder/coder"
108+
groups:
109+
examples-terraform:
110+
patterns:
111+
- "*"
92112

93113
# Update dogfood.
94114
- package-ecosystem: "docker"
@@ -100,6 +120,10 @@ updates:
100120
commit-message:
101121
prefix: "chore"
102122
labels: []
123+
groups:
124+
dogfood-docker:
125+
patterns:
126+
- "*"
103127

104128
- package-ecosystem: "terraform"
105129
directory: "/dogfood/"
@@ -111,4 +135,5 @@ updates:
111135
prefix: "chore"
112136
labels: []
113137
ignore:
138+
# We likely want to update this ourselves.
114139
- dependency-name: "coder/coder"

0 commit comments

Comments
 (0)