Skip to content

CI and CODEOWNERS update #80

CI and CODEOWNERS update

CI and CODEOWNERS update #80

Workflow file for this run

name: Test and Build
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
tags: ["*"]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
- name: Check Formatting
run: |-
files=$(go fmt ./...)
if [ -n "$files" ]; then
echo "The following file(s) do not conform to go fmt:"
echo "$files"
exit 1
fi
- name: Vet code
run: go vet ./...
test:
runs-on: ubuntu-22.04
strategy:
matrix:
go-version:
- '1.18' # oldest supported; named in go.mod
- 'oldstable'
- 'stable'
env:
TEST_RESULTS: "/tmp/test-results"
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go-version }}
cache: true
- uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: 1.9.0
- run: make test