Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: CI
on:
push:
branches: [ main, golang ]
pull_request:
branches: [ main, golang ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24.1'
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Verify dependencies
run: go mod verify
- name: Check formatting
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "The following files are not formatted correctly:"
gofmt -s -l .
exit 1
fi
- name: Run go vet
run: go vet ./...
- name: Run tests
run: go test -v ./...
- name: Run tests with race detector
run: go test -race -v ./...
- name: Build
run: go build -v ./...
- name: Test build for different architectures
run: |
GOOS=linux GOARCH=amd64 go build -o webhook-server-linux-amd64 .
GOOS=linux GOARCH=arm64 go build -o webhook-server-linux-arm64 .