Skip to content

Commit e687f22

Browse files
author
Yixin Hao
committed
Merge tag 'v0.24.1' into immoral-v0.17.0
v0.24.1
2 parents e0d1cb2 + 2c843f4 commit e687f22

File tree

1,070 files changed

+61897
-31906
lines changed

Some content is hidden

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

1,070 files changed

+61897
-31906
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
This file was deleted.

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

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "Setup Go"
2+
description: |
3+
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"
8+
runs:
9+
using: "composite"
10+
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+
20+
- uses: buildjet/setup-go@v4
21+
with:
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
37+
with:
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
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Setup Node"
2+
description: |
3+
Sets up the node environment for tests, builds, etc.
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: buildjet/setup-node@v3
8+
with:
9+
node-version: 16.16.0
10+
# See https://github.com/actions/setup-node#caching-global-packages-data
11+
cache: "yarn"
12+
cache-dependency-path: "site/yarn.lock"
13+
- name: Install node_modules
14+
shell: bash
15+
run: ./scripts/yarn_install.sh
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Upload tests to datadog
2+
if: always()
3+
inputs:
4+
api-key:
5+
description: "Datadog API key"
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- shell: bash
11+
run: |
12+
owner=${{ github.repository_owner }}
13+
echo "owner: $owner"
14+
if [[ $owner != "coder" ]]; then
15+
echo "Not a pull request from the main repo, skipping..."
16+
exit 0
17+
fi
18+
if [[ -z "${{ inputs.api-key }}" ]]; then
19+
# This can happen for dependabot.
20+
echo "No API key provided, skipping..."
21+
exit 0
22+
fi
23+
npm install -g @datadog/datadog-ci
24+
datadog-ci junit upload --service coder ./gotests.xml \
25+
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
26+
env:
27+
DATADOG_API_KEY: ${{ inputs.api-key }}

.github/dependabot.yaml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: "github-actions"
44
directory: "/"
55
schedule:
6-
interval: "monthly"
6+
interval: "weekly"
77
time: "06:00"
88
timezone: "America/Chicago"
99
labels: []
@@ -28,7 +28,7 @@ updates:
2828
- package-ecosystem: "gomod"
2929
directory: "/"
3030
schedule:
31-
interval: "monthly"
31+
interval: "weekly"
3232
time: "06:00"
3333
timezone: "America/Chicago"
3434
commit-message:
@@ -40,12 +40,29 @@ updates:
4040
update-types:
4141
- version-update:semver-patch
4242

43+
# Update our Dockerfile.
44+
- package-ecosystem: "docker"
45+
directory: "/scripts/"
46+
schedule:
47+
interval: "weekly"
48+
time: "06:00"
49+
timezone: "America/Chicago"
50+
commit-message:
51+
prefix: "chore"
52+
labels: []
53+
ignore:
54+
# We need to coordinate terraform updates with the version hardcoded in
55+
# our Go code.
56+
- dependency-name: "terraform"
57+
4358
- package-ecosystem: "npm"
4459
directory: "/site/"
4560
schedule:
4661
interval: "monthly"
4762
time: "06:00"
4863
timezone: "America/Chicago"
64+
reviewers:
65+
- "coder/ts"
4966
commit-message:
5067
prefix: "chore"
5168
labels: []
@@ -72,3 +89,26 @@ updates:
7289
ignore:
7390
# We likely want to update this ourselves.
7491
- dependency-name: "coder/coder"
92+
93+
# Update dogfood.
94+
- package-ecosystem: "docker"
95+
directory: "/dogfood/"
96+
schedule:
97+
interval: "weekly"
98+
time: "06:00"
99+
timezone: "America/Chicago"
100+
commit-message:
101+
prefix: "chore"
102+
labels: []
103+
104+
- package-ecosystem: "terraform"
105+
directory: "/dogfood/"
106+
schedule:
107+
interval: "weekly"
108+
time: "06:00"
109+
timezone: "America/Chicago"
110+
commit-message:
111+
prefix: "chore"
112+
labels: []
113+
ignore:
114+
- dependency-name: "coder/coder"

0 commit comments

Comments
 (0)