From 3517bb9b006f4201de56bdc462c87d2a709bdb4e Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 8 May 2025 21:35:04 -0700 Subject: [PATCH] ci: Add GitHub Actions workflow for Go --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bd19a18 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-and-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: Check formatting + run: |- + go fmt . + git diff --exit-code + + - name: Run go vet + run: go vet ./... + + - name: Build + run: go build ./... + + - name: Run tests + run: go test ./... \ No newline at end of file