seperate go test and container build
Some checks failed
build container / build-container (push) Has been cancelled
Some checks failed
build container / build-container (push) Has been cancelled
This commit is contained in:
29
.gitea/workflows/go-test.yaml
Normal file
29
.gitea/workflows/go-test.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
name: run go test
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**/*.go'
|
||||
- go.mod
|
||||
- go.lock
|
||||
- go.work
|
||||
env:
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: bookworm
|
||||
steps:
|
||||
- name: Setup apt mirror
|
||||
run: sed -i "s,deb.debian.org,${{ vars.DEBIAN_MIRROR }},g" ${{ vars.DEBIAN_APT_SOURCES }}
|
||||
if: ${{ vars.DEBIAN_MIRROR && vars.DEBIAN_APT_SOURCES }}
|
||||
- name: Setup Debian environment
|
||||
run: apt update && apt install -y nodejs
|
||||
- name: Setup Golang
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.0
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
Reference in New Issue
Block a user