Skip to content

Commit

Permalink
ci: add format, lint, build test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
MunifTanjim committed Nov 3, 2024
1 parent b9f83f7 commit b5e5276
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Go

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install Dependencies
run: |
go get .
go get -u golang.org/x/lint/golint
- name: Check Format
run:
declare -r diff="$(gofmt -l .)"
echo "${diff}"
test -z "${diff}"
- name: Lint
run: go vet
- name: Build
run: go build -v ./...
- name: Test
run: go test

0 comments on commit b5e5276

Please sign in to comment.