Skip to content

Merge pull request #114 from Esgrove/actions #8

Merge pull request #114 from Esgrove/actions

Merge pull request #114 from Esgrove/actions #8

Workflow file for this run

name: Go
on:
push:
branches:
- master
- main
paths:
- "go/**"
- ".github/workflows/go.yml"
pull_request:
paths:
- "go/**"
- ".github/workflows/go.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1.21.6"
check-latest: true
- name: "Check go version"
run: go version
- name: Build
working-directory: go
run: chmod +x build.sh && ./build.sh
shell: bash
- name: Format
working-directory: ./go
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "Code is not formatted with gofmt. Please format your code."
gofmt -d .
exit 1
fi
shell: bash