Skip to content

add github ci

add github ci #1

Workflow file for this run

on:
push:
branches: [ "master" ]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest
- name: Format
run: goimports -w . && gofumpt -w .
- name: Verify
run: |
if [ -n "$(git diff)" ]; then
git diff
exit 1
fi
- name: Build
run: go build -v ./...
- name: Vet
run: go vet -v ./...