Set up CI, enforce gofmt #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
name: CI | |
jobs: | |
test: | |
name: run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.13.0' | |
- name: Run tests | |
run: go test | |
fmt: | |
name: run gofmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.13.0' | |
- name: run gofmt | |
run: diff -u <(echo -n) <(gofmt -d ./) |