Skip to content

Add github actions

Add github actions #1

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
gofmt:
name: Go Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Run gofmt
run: gofmt -l -s .
# golangci-lint:
# name: Go Lint
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: '1.22'
# - name: Install golangci-lint
# run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# - name: Run golangci-lint
# run: golangci-lint run
test:
name: Go Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Run tests
run: go test ./... -v