Some checks failed
CI/CD Go Verification / build_and_test (push) Failing after 1s
36 lines
No EOL
760 B
YAML
36 lines
No EOL
760 B
YAML
name: CI/CD Go Verification
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build_and_test:
|
|
runs-on: node20
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
cache: true
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Check code formatting
|
|
run: |
|
|
if [ -n "$(gofmt -l .)" ]; then
|
|
echo "Code is not formatted correctly. Run 'gofmt -w .'"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build Application
|
|
run: go build -v ./...
|
|
|
|
- name: Run Tests (with Mocked Boundaries)
|
|
run: go test -v -cover ./... |