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

Skip to content

Commit 09967d8

Browse files
committed
ci
1 parent ee8c6e5 commit 09967d8

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ runs:
2626
export GOCACHE_DIR="$RUNNER_TEMP""\go-cache"
2727
export GOMODCACHE_DIR="$RUNNER_TEMP""\go-mod-cache"
2828
export GOPATH_DIR="$RUNNER_TEMP""\go-path"
29+
export GOTMP_DIR="$RUNNER_TEMP""\go-tmp"
2930
mkdir -p "$GOCACHE_DIR"
3031
mkdir -p "$GOMODCACHE_DIR"
3132
mkdir -p "$GOPATH_DIR"
33+
mkdir -p "$GOTMP_DIR"
3234
go env -w GOCACHE="$GOCACHE_DIR"
3335
go env -w GOMODCACHE="$GOMODCACHE_DIR"
3436
go env -w GOPATH="$GOPATH_DIR"
35-
37+
go env -w GOTMPDIR="$GOTMP_DIR"
3638
- name: Setup Go
3739
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
3840
with:

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ jobs:
454454
api-key: ${{ secrets.DATADOG_API_KEY }}
455455

456456
test-go-pg:
457-
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }}
457+
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || matrix.os }}
458458
needs: changes
459459
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
460460
# This timeout must be greater than the timeout set by `go test` in

.github/workflows/nightly-gauntlet.yaml

+17-11
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ on:
66
# Every day at 4AM
77
- cron: "0 4 * * 1-5"
88
workflow_dispatch:
9+
pull_request:
10+
branches:
11+
- main
912

1013
permissions:
1114
contents: read
1215

1316
jobs:
1417
test-go-pg:
15-
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
16-
if: github.ref == 'refs/heads/main'
18+
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'depot-windows-2022-16' || matrix.os }}
1719
# This timeout must be greater than the timeout set by `go test` in
1820
# `make test-postgres` to ensure we receive a trace of running
1921
# goroutines. Setting this to the timeout +5m should work quite well
@@ -31,22 +33,29 @@ jobs:
3133
with:
3234
egress-policy: audit
3335

36+
# Set up RAM disks to speed up the rest of the job. This action is in
37+
# a separate repository to allow its use before actions/checkout.
38+
- name: Setup RAM Disks
39+
if: runner.os == 'Windows'
40+
uses: coder/setup-ramdisk-action@79dacfe70c47ad6d6c0dd7f45412368802641439
41+
3442
- name: Checkout
3543
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3644
with:
3745
fetch-depth: 1
3846

3947
- name: Setup Go
4048
uses: ./.github/actions/setup-go
49+
with:
50+
# Runners have Go baked-in and Go will automatically
51+
# download the toolchain configured in go.mod, so we don't
52+
# need to reinstall it. It's faster on Windows runners.
53+
use-preinstalled-go: ${{ runner.os == 'Windows' }}
54+
use-temp-cache-dirs: ${{ runner.os == 'Windows' }}
4155

4256
- name: Setup Terraform
4357
uses: ./.github/actions/setup-tf
4458

45-
# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
46-
- name: Setup ImDisk
47-
if: runner.os == 'Windows'
48-
uses: ./.github/actions/setup-imdisk
49-
5059
- name: Test with PostgreSQL Database
5160
env:
5261
POSTGRES_VERSION: "13"
@@ -81,10 +90,7 @@ jobs:
8190
go run scripts/embedded-pg/main.go
8291
fi
8392
84-
# Reduce test parallelism, mirroring what we do for race tests.
85-
# We'd been encountering issues with timing related flakes, and
86-
# this seems to help.
87-
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
93+
DB=ci gotestsum --rerun-fails=2 --rerun-fails-max-failures=1000 --format standard-quiet -- -v -p 8 -parallel 16 -count=1 - ./...
8894
8995
- name: Upload test stats to Datadog
9096
timeout-minutes: 1

0 commit comments

Comments
 (0)