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

Skip to content

Commit 9eef36a

Browse files
committed
Merge branch 'main' into fastpg
2 parents d57cbd1 + 92bcace commit 9eef36a

File tree

129 files changed

+4451
-1071
lines changed

Some content is hidden

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

129 files changed

+4451
-1071
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!--- Provide a general summary of the issue in the Title above -->
2+
3+
## Expected Behavior
4+
5+
<!--- Tell us what should happen -->
6+
7+
## Current Behavior
8+
9+
<!--- Tell us what happens instead of the expected behavior -->

.github/workflows/coder.yaml

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ jobs:
111111
- uses: actions/setup-go@v3
112112
with:
113113
go-version: "~1.18"
114-
- run: curl -sSL
115-
https://github.com/kyleconroy/sqlc/releases/download/v1.13.0/sqlc_1.13.0_linux_amd64.tar.gz
116-
| sudo tar -C /usr/bin -xz sqlc
114+
- run: |
115+
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.13.0/sqlc_1.13.0_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
117116
118117
- run: go install google.golang.org/protobuf/cmd/[email protected]
119118
- run: go install storj.io/drpc/cmd/[email protected]
@@ -188,7 +187,7 @@ jobs:
188187
path: ${{ steps.go-cache-paths.outputs.go-mod }}
189188
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
190189

191-
- name: Install goreleaser
190+
- name: Install gotestsum
192191
uses: jaxxstorm/[email protected]
193192
env:
194193
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -203,13 +202,10 @@ jobs:
203202

204203
- name: Test with Mock Database
205204
shell: bash
206-
env:
207-
GOCOUNT: ${{ runner.os == 'Windows' && 1 || 2 }}
208-
GOMAXPROCS: ${{ runner.os == 'Windows' && 1 || 2 }}
209205
run: gotestsum --junitfile="gotests.xml" --packages="./..." --
210206
-covermode=atomic -coverprofile="gotests.coverage"
211207
-coverpkg=./...,github.com/coder/coder/codersdk
212-
-timeout=5m -count=$GOCOUNT -short -failfast
208+
-timeout=5m -short -failfast
213209

214210
- name: Upload DataDog Trace
215211
if: always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
@@ -226,7 +222,7 @@ jobs:
226222
token: ${{ secrets.CODECOV_TOKEN }}
227223
files: ./gotests.coverage
228224
flags: unittest-go-${{ matrix.os }}
229-
# this flakes and sometimes fails the build
225+
# this flakes and sometimes fails the build
230226
fail_ci_if_error: false
231227

232228
test-go-postgres:
@@ -258,7 +254,7 @@ jobs:
258254
path: ${{ steps.go-cache-paths.outputs.go-mod }}
259255
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
260256

261-
- name: Install goreleaser
257+
- name: Install gotestsum
262258
uses: jaxxstorm/[email protected]
263259
env:
264260
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -324,7 +320,7 @@ jobs:
324320
token: ${{ secrets.CODECOV_TOKEN }}
325321
files: ./gotests.coverage
326322
flags: unittest-go-postgres-${{ matrix.os }}
327-
# this flakes and sometimes fails the build
323+
# this flakes and sometimes fails the build
328324
fail_ci_if_error: false
329325

330326
deploy:
@@ -337,6 +333,8 @@ jobs:
337333
id-token: write
338334
steps:
339335
- uses: actions/checkout@v3
336+
with:
337+
fetch-depth: 0
340338

341339
- name: Authenticate to Google Cloud
342340
uses: google-github-actions/auth@v0
@@ -380,18 +378,34 @@ jobs:
380378
restore-keys: |
381379
js-${{ runner.os }}-
382380
383-
- uses: goreleaser/goreleaser-action@v3
384-
with:
385-
install-only: true
381+
- name: Install nfpm
382+
run: go install github.com/goreleaser/nfpm/v2/cmd/[email protected]
383+
384+
- name: Install zstd
385+
run: sudo apt-get install -y zstd
386386

387387
- name: Build site
388388
run: make -B site/out/index.html
389389

390390
- name: Build Release
391-
uses: goreleaser/goreleaser-action@v3
392-
with:
393-
version: latest
394-
args: release --snapshot --rm-dist --skip-sign
391+
run: |
392+
set -euo pipefail
393+
go mod download
394+
395+
mkdir -p ./dist
396+
# build slim binaries
397+
./scripts/build_go_slim.sh \
398+
--output ./dist/ \
399+
--compress 22 \
400+
linux:amd64,armv7,arm64 \
401+
windows:amd64,arm64 \
402+
darwin:amd64,arm64
403+
404+
# build linux amd64 packages
405+
./scripts/build_go_matrix.sh \
406+
--output ./dist/ \
407+
--package-linux \
408+
linux:amd64
395409
396410
- name: Install Release
397411
run: |
@@ -408,8 +422,11 @@ jobs:
408422
with:
409423
name: coder
410424
path: |
411-
./dist/coder_*_linux_amd64.tar.gz
412-
./dist/coder_*_windows_amd64.zip
425+
./dist/*.zip
426+
./dist/*.tar.gz
427+
./dist/*.apk
428+
./dist/*.deb
429+
./dist/*.rpm
413430
retention-days: 7
414431

415432
test-js:
@@ -451,7 +468,7 @@ jobs:
451468
token: ${{ secrets.CODECOV_TOKEN }}
452469
files: ./site/coverage/lcov.info
453470
flags: unittest-js
454-
# this flakes and sometimes fails the build
471+
# this flakes and sometimes fails the build
455472
fail_ci_if_error: false
456473

457474
- name: Upload DataDog Trace
@@ -498,10 +515,6 @@ jobs:
498515
with:
499516
node-version: "14"
500517

501-
- uses: goreleaser/goreleaser-action@v3
502-
with:
503-
install-only: true
504-
505518
- name: Echo Go Cache Paths
506519
id: go-cache-paths
507520
run: |

0 commit comments

Comments
 (0)