mirror of
https://github.com/nyanotech/object-holder.git
synced 2025-12-16 11:30:24 -08:00
31 lines
604 B
YAML
31 lines
604 B
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ "depot" ]
|
|
pull_request:
|
|
branches: [ "depot" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
- name: Format check
|
|
run: |
|
|
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
|
|
echo "Code is not formatted. Run 'go fmt ./...'"
|
|
gofmt -s -l .
|
|
exit 1
|
|
fi
|
|
- name: Vet
|
|
run: go vet ./...
|
|
- name: Build
|
|
run: go build -v ./...
|
|
- name: Test
|
|
run: go test -v ./...
|