29 lines
528 B
YAML
29 lines
528 B
YAML
name: Push
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: CI
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
# Run on the latest minor release of Go, e.g. 1.21.3:
|
|
go-version: 'stable'
|
|
|
|
- name: Ensure all files were formatted as per gofmt
|
|
run: |
|
|
[ "$(gofmt -l $(find . -name '*.go') 2>&1)" = "" ]
|
|
|
|
- name: run tests
|
|
run: |
|
|
go test ./...
|