Skip to content

add CI github action #2

add CI github action

add CI github action #2

Workflow file for this run

---
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
go: ["stable", "oldstable"]
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- run: go mod verify
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- run: go vet ./...
- name: go fmt
run: |
go fmt ./...
git diff --exit-code
- name: go test
run: go test -v -count=1 -shuffle=on ./...