Skip to content

version update

version update #267

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ["1.20"]
steps:
- uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
export PATH="$HOME/go/bin:$PATH"
- name: Build
working-directory: ./src
run: go build -v ./...
- name: Test
working-directory: ./src
run: go test -v ./...
- name: Format
run: if [ "$(goimports -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
if: matrix.go-version == 1.20