fix windows ci (#934)

* fix windows ci

* perm

* use custom writer

* remove patches

* fuck codeql
This commit is contained in:
UUBulb
2025-01-01 00:58:57 +08:00
committed by GitHub
parent 7662471c2f
commit 3c72d6ce64
5 changed files with 29 additions and 131 deletions

View File

@@ -50,11 +50,6 @@ jobs:
with:
go-version: "1.23.1"
- name: patch net/http/fs.go
run: |
patch -p0 --forward `go env GOROOT`/src/net/http/fs.go < ./script/patch/fs.patch || true
patch -p0 --forward `go env GOMODCACHE`/github.com/gin-gonic/gin@v1.10.0/context.go < ./script/patch/gin-context.patch || true
- name: generate swagger docs
run: |
go install github.com/swaggo/swag/cmd/swag@latest

View File

@@ -18,36 +18,31 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu, windows, macos]
runs-on: ${{ matrix.os }}-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.1"
- name: patch net/http/fs.go
run: |
patch -p0 --forward `go env GOROOT`/src/net/http/fs.go < ./script/patch/fs.patch || true
patch -p0 --forward `go env GOMODCACHE`/github.com/gin-gonic/gin@v1.10.0/context.go < ./script/patch/gin-context.patch || true
- name: generate swagger docs
run: |
go install github.com/swaggo/swag/cmd/swag@latest
touch ./cmd/dashboard/user-dist/a
touch ./cmd/dashboard/admin-dist/a
swag init --pd -d . -g ./cmd/dashboard/main.go -o ./cmd/dashboard/docs --parseGoList=false
- name: Unit test
run: |
go test -v ./...
- name: Build test
run: go build -v ./cmd/dashboard
- name: Run Gosec Security Scanner
if: runner.os == 'Linux'
uses: securego/gosec@master