Skip to content

Implement load balancing strategies and update configuration; add rou… #6

Implement load balancing strategies and update configuration; add rou…

Implement load balancing strategies and update configuration; add rou… #6

Workflow file for this run

name: CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Cache Dependencies
uses: actions/cache@v3
id: gomod-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.mod') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Dependencies
run: go mod tidy
- name: Lint
run: |
go install golang.org/x/lint/golint@latest
golint ./...
- name: Format Check
run: |
unformatted=$(go fmt ./...)
if [ -n "$unformatted" ]; then
echo "The following files are not formatted:"
echo "$unformatted"
exit 1
else
echo "Code is formatted."
fi
- name: Vet
run: go vet ./...
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...