34 lines
615 B
YAML
34 lines
615 B
YAML
name: Backend CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: [backend/**]
|
|
pull_request:
|
|
branches: [main]
|
|
paths: [backend/**]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: aliyun
|
|
container: golang:1.23-bookworm
|
|
env:
|
|
GOPROXY: https://goproxy.cn,direct
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
steps:
|
|
- uses: http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4
|
|
|
|
- name: Download dependencies
|
|
run: go mod download
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Build
|
|
run: go build ./cmd/server
|
|
|
|
- name: Test
|
|
run: go test ./...
|