File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ name : Build on Ubuntu
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v4
22+ with :
23+ go-version : ' 1.26.4'
24+
25+ - name : Cache Go modules
26+ uses : actions/cache@v4
27+ with :
28+ path : |
29+ ~/.cache/go-build
30+ ${{ github.workspace }}/pkg/mod
31+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
32+ restore-keys : |
33+ ${{ runner.os }}-go-
34+
35+ - name : Install dependencies
36+ run : go mod download
37+
38+ - name : Build application
39+ run : make build
40+
41+ - name : Validate binary exists
42+ run : test -f bin/server
Original file line number Diff line number Diff line change 11# Makefile for goding - build, test, run the server
22
33BINARY := bin/server
4- PKG := ./cmd/server
4+ PKG := main.go
55
66.PHONY : all build test run clean help
77
You can’t perform that action at this time.
0 commit comments