Skip to content

Commit 2e0f7b3

Browse files
committed
wush
1 parent 79f1e47 commit 2e0f7b3

File tree

2 files changed

+32
-124
lines changed

2 files changed

+32
-124
lines changed

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

+23-23
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ runs:
2020
with:
2121
go-version: ${{ inputs.version }}
2222
cache: ${{ inputs.cache }}
23-
- name: Install gotestsum and mtimehash
24-
shell: bash
25-
run: |
26-
export BUILD_CACHE_PATH=${{ inputs.build-cache-path }}
27-
if [ -n "${BUILD_CACHE_PATH}" ]; then
28-
mkdir -p "${BUILD_CACHE_PATH}"
29-
export GOCACHE="${BUILD_CACHE_PATH}/build"
30-
export GOMODCACHE="${BUILD_CACHE_PATH}/mod"
31-
fi
32-
go install gotest.tools/gotestsum@latest
33-
go install github.com/slsyy/mtimehash/cmd/mtimehash@latest
23+
# - name: Install gotestsum and mtimehash
24+
# shell: bash
25+
# run: |
26+
# export BUILD_CACHE_PATH=${{ inputs.build-cache-path }}
27+
# if [ -n "${BUILD_CACHE_PATH}" ]; then
28+
# mkdir -p "${BUILD_CACHE_PATH}"
29+
# export GOCACHE="${BUILD_CACHE_PATH}/build"
30+
# export GOMODCACHE="${BUILD_CACHE_PATH}/mod"
31+
# fi
32+
# go install gotest.tools/gotestsum@latest
33+
# go install github.com/slsyy/mtimehash/cmd/mtimehash@latest
3434

35-
# It isn't necessary that we ever do this, but it helps
36-
# separate the "setup" from the "run" times.
37-
- name: go mod download
38-
shell: bash
39-
run: |
40-
export BUILD_CACHE_PATH=${{ inputs.build-cache-path }}
41-
if [ -n "${BUILD_CACHE_PATH}" ]; then
42-
mkdir -p "${BUILD_CACHE_PATH}"
43-
export GOCACHE="${BUILD_CACHE_PATH}/build"
44-
export GOMODCACHE="${BUILD_CACHE_PATH}/mod"
45-
fi
46-
go mod download -x
35+
# # It isn't necessary that we ever do this, but it helps
36+
# # separate the "setup" from the "run" times.
37+
# - name: go mod download
38+
# shell: bash
39+
# run: |
40+
# export BUILD_CACHE_PATH=${{ inputs.build-cache-path }}
41+
# if [ -n "${BUILD_CACHE_PATH}" ]; then
42+
# mkdir -p "${BUILD_CACHE_PATH}"
43+
# export GOCACHE="${BUILD_CACHE_PATH}/build"
44+
# export GOMODCACHE="${BUILD_CACHE_PATH}/mod"
45+
# fi
46+
# go mod download -x

.github/workflows/ci.yaml

+9-101
Original file line numberDiff line numberDiff line change
@@ -236,45 +236,6 @@ jobs:
236236
with:
237237
fetch-depth: 1
238238

239-
- name: Setup Node
240-
uses: ./.github/actions/setup-node
241-
242-
- name: Setup Go
243-
uses: ./.github/actions/setup-go
244-
245-
- name: Setup sqlc
246-
uses: ./.github/actions/setup-sqlc
247-
248-
- name: Setup Terraform
249-
uses: ./.github/actions/setup-tf
250-
251-
- name: go install tools
252-
uses: ./.github/actions/setup-go-tools
253-
254-
- name: Install Protoc
255-
run: |
256-
mkdir -p /tmp/proto
257-
pushd /tmp/proto
258-
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
259-
unzip protoc.zip
260-
cp -r ./bin/* /usr/local/bin
261-
cp -r ./include /usr/local/bin/include
262-
popd
263-
264-
- name: make gen
265-
run: |
266-
# Remove golden files to detect discrepancy in generated files.
267-
make clean/golden-files
268-
# Notifications require DB, we could start a DB instance here but
269-
# let's just restore for now.
270-
git checkout -- coderd/notifications/testdata/rendered-templates
271-
# no `-j` flag as `make` fails with:
272-
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
273-
make --output-sync -B gen
274-
275-
- name: Check for unstaged files
276-
run: ./scripts/check_unstaged.sh
277-
278239
fmt:
279240
needs: changes
280241
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
@@ -313,10 +274,10 @@ jobs:
313274
run: ./scripts/check_unstaged.sh
314275

315276
test-go:
316-
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || 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 }}
277+
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'depot-windows-2022-4' || matrix.os }}
317278
needs: changes
318279
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
319-
timeout-minutes: 20
280+
timeout-minutes: 90
320281
strategy:
321282
fail-fast: false
322283
matrix:
@@ -340,74 +301,21 @@ jobs:
340301
if: runner.os == 'Windows'
341302
uses: ./.github/actions/setup-imdisk
342303

343-
- name: Download Go Build Cache
344-
id: download-go-build-cache
345-
uses: ./.github/actions/test-cache/download
346-
if: runner.os == 'Windows'
347-
with:
348-
key-prefix: test-go-build-11-${{ runner.os }}-${{ runner.arch }}
349-
cache-path: "/r/.cache/go-cache"
350-
351304
- name: Setup Go
352305
uses: ./.github/actions/setup-go
353306
with:
354-
build-cache-path: /r/.cache/go-cache
307+
version: "1.23.8"
355308
cache: false
356309

357-
- name: Normalize File and Directory Timestamps
310+
- name: Wush
311+
if: runner.os == 'Windows'
358312
shell: bash
359313
run: |
360-
find . -type f ! -path ./.git/\*\* | mtimehash
361-
find . -type d ! -path ./.git/\*\* -exec touch -t 200601010000 {} +
362-
363-
- name: Setup Terraform
364-
uses: ./.github/actions/setup-tf
314+
curl -L -o wush.zip https://github.com/coder/wush/releases/download/v0.4.1/wush_0.4.1_windows_amd64.zip
315+
unzip -o wush.zip
365316
366-
- name: Download Test Cache
367-
id: download-cache
368-
uses: ./.github/actions/test-cache/download
369-
with:
370-
key-prefix: test-go-${{ runner.os }}-${{ runner.arch }}
371-
372-
# - name: Test with Mock Database
373-
# id: test
374-
# shell: bash
375-
# run: |
376-
# # if macOS, install google-chrome for scaletests. As another concern,
377-
# # should we really have this kind of external dependency requirement
378-
# # on standard CI?
379-
# if [ "${{ matrix.os }}" == "macos-latest" ]; then
380-
# brew install google-chrome
381-
# fi
382-
383-
# # By default Go will use the number of logical CPUs, which
384-
# # is a fine default.
385-
# PARALLEL_FLAG=""
386-
387-
# # macOS will output "The default interactive shell is now zsh"
388-
# # intermittently in CI...
389-
# if [ "${{ matrix.os }}" == "macos-latest" ]; then
390-
# touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
391-
# fi
392-
# export TS_DEBUG_DISCO=true
393-
# export GOCACHE=/r/.cache/go-cache/build
394-
# export GOMODCACHE=/r/.cache/go-cache/mod
395-
# echo "PATH: $PATH"
396-
# gotestsum --junitfile="gotests.xml" --jsonfile="gotests.json" \
397-
# --packages="./..." -- $PARALLEL_FLAG -short -failfast
398-
399-
- name: Upload Test Cache
400-
uses: ./.github/actions/test-cache/upload
401-
with:
402-
cache-key: ${{ steps.download-cache.outputs.cache-key }}
403-
404-
- name: Upload Go Build Cache
405-
if: runner.os == 'Windows'
406-
uses: ./.github/actions/test-cache/upload
407-
with:
408-
cache-key: ${{ steps.download-go-build-cache.outputs.cache-key }}-${{ github.run_id }}-${{ github.run_attempt }}
409-
cache-path: "/r/.cache/go-cache"
410-
override-condition: "true"
317+
chmod +x wush.exe
318+
./wush.exe serve
411319
412320
# We don't run the full test-suite for Windows & MacOS, so we just run the CLI tests on every PR.
413321
# We run the test suite in test-go-pg, including CLI.

0 commit comments

Comments
 (0)