-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 979 Bytes
/
ci.yml
File metadata and controls
44 lines (37 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true
- name: Verify Dependencies
run: |
go mod tidy
if [ -n "$(git status --porcelain)" ]; then
echo "go.mod or go.sum is not tidy. Please run 'go mod tidy' and commit the changes."
git status
git diff
exit 1
fi
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
args: --timeout=5m
- name: Run Tests with Coverage
run: go test -v -race -coverpkg=./... -coverprofile=coverage.out ./...
- name: Build
run: go build -v -o lazygcs main.go