Skip to content

Bump actions/setup-go from 4.0.0 to 4.1.0 #14

Bump actions/setup-go from 4.0.0 to 4.1.0

Bump actions/setup-go from 4.0.0 to 4.1.0 #14

name: Test and Build
on:
push:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- run: go mod download
- 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 ./...
go-test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- '1.13' # oldest supported; named in go.mod
- 'oldstable'
- 'stable'
env:
TEST_RESULTS_PATH: '/tmp/test-results'
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: ${{ matrix.go-version }}
- uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: 1.9.0
- run: mkdir -p "$TEST_RESULTS_PATH"
- name: Run go tests
run: |
gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH/gotestsum-report.xml" -- ./...
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
path: ${{ env.TEST_RESULTS_PATH }}
name: tests-linux