Skip to content

Add workflows for all languages #3

Add workflows for all languages

Add workflows for all languages #3

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"
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: go build -v
- 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