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

Skip to content

Commit aa5e6b2

Browse files
authored
Merge branch 'coder:main' into main
2 parents 5b07815 + c0c83f1 commit aa5e6b2

File tree

698 files changed

+29154
-10054
lines changed

Some content is hidden

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

698 files changed

+29154
-10054
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RUN mkdir -p /etc/apt/keyrings \
5757
&& echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' >> /etc/docker/daemon.json
5858

5959
# install golang and language tooling
60-
ENV GO_VERSION=1.19
60+
ENV GO_VERSION=1.20
6161
ENV GOPATH=$HOME/go-packages
6262
ENV GOROOT=$HOME/go
6363
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
site/ @coder/frontend
21
docs/ @coder/docs
32
README.md @coder/docs
43
ADOPTERS.md @coder/docs

.github/workflows/coder.yaml renamed to .github/workflows/ci.yaml

Lines changed: 73 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: coder
1+
name: ci
22

33
on:
44
push:
@@ -28,22 +28,73 @@ concurrency:
2828
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2929

3030
jobs:
31-
typos:
32-
runs-on: ubuntu-latest
31+
lint:
32+
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v2
36-
- name: typos-action
37-
uses: crate-ci/[email protected]
35+
uses: actions/checkout@v3
36+
37+
# Install Go!
38+
- uses: actions/setup-go@v3
39+
with:
40+
go-version: "~1.20"
41+
42+
# Check for any typos!
43+
- name: Check for typos
44+
uses: crate-ci/[email protected]
3845
with:
3946
config: .github/workflows/typos.toml
40-
- name: Fix Helper
47+
- name: Fix the typos
4148
if: ${{ failure() }}
4249
run: |
4350
echo "::notice:: you can automatically fix typos from your CLI:
4451
cargo install typos-cli
4552
typos -c .github/workflows/typos.toml -w"
4653
54+
# Check for Go linting errors!
55+
- name: Lint Go
56+
uses: golangci/[email protected]
57+
with:
58+
version: v1.51.0
59+
60+
- name: Lint shell scripts
61+
uses: ludeeus/[email protected]
62+
env:
63+
SHELLCHECK_OPTS: --external-sources
64+
with:
65+
ignore: node_modules
66+
67+
# Lint our dashboard!
68+
- name: Cache node_modules
69+
id: cache-node
70+
uses: actions/cache@v3
71+
with:
72+
path: |
73+
**/node_modules
74+
.eslintcache
75+
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
76+
restore-keys: |
77+
js-${{ runner.os }}-
78+
- name: Install node_modules
79+
run: ./scripts/yarn_install.sh
80+
- name: Lint TypeScript
81+
run: yarn lint
82+
working-directory: site
83+
84+
# Make sure the Helm chart is linted!
85+
- name: Install helm
86+
uses: azure/setup-helm@v3
87+
with:
88+
version: v3.9.2
89+
- name: Lint Helm chart
90+
run: |
91+
cd helm
92+
make lint
93+
94+
# Ensure AGPL and Enterprise are separated!
95+
- name: Check for AGPL code importing Enterprise...
96+
run: ./scripts/check_enterprise_imports.sh
97+
4798
changes:
4899
runs-on: ubuntu-latest
49100
outputs:
@@ -70,108 +121,16 @@ jobs:
70121
- 'site/**'
71122
k8s:
72123
- 'helm/**'
73-
- Dockerfile
124+
- scripts/Dockerfile
125+
- scripts/Dockerfile.base
74126
- scripts/helm.sh
75127
- id: debug
76128
run: |
77129
echo "${{ toJSON(steps.filter )}}"
78130
79-
# Debug step
80-
debug-inputs:
81-
needs:
82-
- changes
83-
runs-on: ubuntu-latest
84-
steps:
85-
- id: log
86-
run: |
87-
echo "${{ toJSON(needs) }}"
88-
89-
style-lint-golangci:
90-
name: style/lint/golangci
91-
timeout-minutes: 5
92-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || 'ubuntu-latest' }}
93-
steps:
94-
- uses: actions/checkout@v3
95-
- uses: actions/setup-go@v3
96-
with:
97-
go-version: "~1.19"
98-
- name: golangci-lint
99-
uses: golangci/[email protected]
100-
with:
101-
version: v1.48.0
102-
103-
check-enterprise-imports:
104-
name: check/enterprise-imports
105-
timeout-minutes: 5
106-
runs-on: ubuntu-latest
107-
steps:
108-
- uses: actions/checkout@v3
109-
- name: Check imports of enterprise code
110-
run: ./scripts/check_enterprise_imports.sh
111-
112-
style-lint-shellcheck:
113-
name: style/lint/shellcheck
114-
timeout-minutes: 5
115-
runs-on: ubuntu-latest
116-
steps:
117-
- uses: actions/checkout@v3
118-
- name: Run ShellCheck
119-
uses: ludeeus/[email protected]
120-
env:
121-
SHELLCHECK_OPTS: --external-sources
122-
with:
123-
ignore: node_modules
124-
125-
style-lint-typescript:
126-
name: "style/lint/typescript"
127-
timeout-minutes: 5
128-
runs-on: ubuntu-latest
129-
steps:
130-
- name: Checkout
131-
uses: actions/checkout@v3
132-
133-
- name: Cache Node
134-
id: cache-node
135-
uses: actions/cache@v3
136-
with:
137-
path: |
138-
**/node_modules
139-
.eslintcache
140-
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
141-
restore-keys: |
142-
js-${{ runner.os }}-
143-
144-
- name: Install node_modules
145-
run: ./scripts/yarn_install.sh
146-
147-
- name: "yarn lint"
148-
run: yarn lint
149-
working-directory: site
150-
151-
style-lint-k8s:
152-
name: "style/lint/k8s"
153-
timeout-minutes: 5
154-
needs: changes
155-
if: needs.changes.outputs.k8s == 'true'
156-
runs-on: ubuntu-latest
157-
steps:
158-
- name: Checkout
159-
uses: actions/checkout@v3
160-
161-
- name: Install helm
162-
uses: azure/setup-helm@v3
163-
with:
164-
version: v3.9.2
165-
166-
- name: cd helm && make lint
167-
run: |
168-
cd helm
169-
make lint
170-
171131
gen:
172-
name: "style/gen"
173132
timeout-minutes: 8
174-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || 'ubuntu-latest' }}
133+
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
175134
needs: changes
176135
if: needs.changes.outputs.docs-only == 'false'
177136
steps:
@@ -193,7 +152,7 @@ jobs:
193152

194153
- uses: actions/setup-go@v3
195154
with:
196-
go-version: "~1.19"
155+
go-version: "~1.20"
197156

198157
- name: Echo Go Cache Paths
199158
id: go-cache-paths
@@ -243,8 +202,7 @@ jobs:
243202
- name: Check for unstaged files
244203
run: ./scripts/check_unstaged.sh
245204

246-
style-fmt:
247-
name: "style/fmt"
205+
fmt:
248206
runs-on: ubuntu-latest
249207
timeout-minutes: 5
250208
steps:
@@ -280,8 +238,7 @@ jobs:
280238
run: ./scripts/check_unstaged.sh
281239

282240
test-go:
283-
name: "test/go"
284-
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-8-cores'|| matrix.os }}
241+
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-8-cores'|| matrix.os }}
285242
timeout-minutes: 20
286243
strategy:
287244
matrix:
@@ -294,7 +251,7 @@ jobs:
294251

295252
- uses: actions/setup-go@v3
296253
with:
297-
go-version: "~1.19"
254+
go-version: "~1.20"
298255

299256
# Sadly the new "set output" syntax (of writing env vars to
300257
# $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
@@ -365,9 +322,8 @@ jobs:
365322
files: ./gotests.coverage
366323
flags: unittest-go-${{ matrix.os }}
367324

368-
test-go-postgres:
369-
name: "test/go/postgres"
370-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || 'ubuntu-latest' }}
325+
test-go-psql:
326+
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
371327
# This timeout must be greater than the timeout set by `go test` in
372328
# `make test-postgres` to ensure we receive a trace of running
373329
# goroutines. Setting this to the timeout +5m should work quite well
@@ -378,7 +334,7 @@ jobs:
378334

379335
- uses: actions/setup-go@v3
380336
with:
381-
go-version: "~1.19"
337+
go-version: "~1.20"
382338

383339
- name: Echo Go Cache Paths
384340
id: go-cache-paths
@@ -436,7 +392,7 @@ jobs:
436392

437393
deploy:
438394
name: "deploy"
439-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || 'ubuntu-latest' }}
395+
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
440396
timeout-minutes: 30
441397
needs: changes
442398
if: |
@@ -461,7 +417,7 @@ jobs:
461417

462418
- uses: actions/setup-go@v3
463419
with:
464-
go-version: "~1.19"
420+
go-version: "~1.20"
465421

466422
- name: Echo Go Cache Paths
467423
id: go-cache-paths
@@ -532,8 +488,7 @@ jobs:
532488
retention-days: 7
533489

534490
test-js:
535-
name: "test/js"
536-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || 'ubuntu-latest' }}
491+
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
537492
timeout-minutes: 20
538493
steps:
539494
- uses: actions/checkout@v3
@@ -572,16 +527,11 @@ jobs:
572527
flags: unittest-js
573528

574529
test-e2e:
575-
name: "test/e2e/${{ matrix.os }}"
576530
needs:
577531
- changes
578532
if: needs.changes.outputs.docs-only == 'false'
579-
runs-on: ${{ matrix.os }}
533+
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
580534
timeout-minutes: 20
581-
strategy:
582-
matrix:
583-
os:
584-
- ubuntu-latest
585535
steps:
586536
- uses: actions/checkout@v3
587537

@@ -596,7 +546,7 @@ jobs:
596546

597547
- uses: actions/setup-go@v3
598548
with:
599-
go-version: "~1.19"
549+
go-version: "~1.20"
600550

601551
- uses: hashicorp/setup-terraform@v2
602552
with:
@@ -633,9 +583,6 @@ jobs:
633583
- run: yarn playwright:install
634584
working-directory: site
635585

636-
- run: yarn playwright:install-deps
637-
working-directory: site
638-
639586
- run: yarn playwright:test
640587
env:
641588
DEBUG: pw:api
@@ -693,23 +640,3 @@ jobs:
693640
buildScriptName: "storybook:build"
694641
projectToken: 695c25b6cb65
695642
workingDir: "./site"
696-
markdown-link-check:
697-
runs-on: ubuntu-latest
698-
steps:
699-
- uses: actions/checkout@master
700-
# For the main branch:
701-
- if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
702-
uses: gaurav-nelson/github-action-markdown-link-check@v1
703-
with:
704-
use-quiet-mode: yes
705-
use-verbose-mode: yes
706-
config-file: .github/workflows/mlc_config.json
707-
# For pull requests:
708-
- if: github.ref != 'refs/heads/main' || github.event.pull_request.head.repo.fork
709-
uses: gaurav-nelson/github-action-markdown-link-check@v1
710-
with:
711-
use-quiet-mode: yes
712-
use-verbose-mode: yes
713-
check-modified-files-only: yes
714-
base-branch: main
715-
config-file: .github/workflows/mlc_config.json

.github/workflows/cla.yaml

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

0 commit comments

Comments
 (0)