mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-09-02 17:33:47 +00:00
35 lines
595 B
YAML
35 lines
595 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main,dev]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Format check
|
|
run: |
|
|
if [ -n "$(gofmt -l .)" ]; then
|
|
echo "The following files are not formatted:"
|
|
gofmt -l .
|
|
exit 1
|
|
fi
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Test
|
|
run: go test ./...
|