Skip to content

added workflows

added workflows #1

Workflow file for this run

name: Go CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.5'
- name: Install dependencies
run: go mod download
- name: Run gofmt
run: |
fmt_output=$(gofmt -l .)
if [ -n "$fmt_output" ]; then
echo " Files not properly formatted:"
echo "$fmt_output"
exit 1
fi
- name: Run go vet
run: go vet ./...
- name: Build
run: go build ./...