-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.03 KB
/
Copy pathbuild.yml
File metadata and controls
51 lines (43 loc) · 1.03 KB
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
45
46
47
48
49
50
51
name: PR Check
on:
pull_request:
branches: [ "main" ]
env:
GO_VERSION: '1.23'
RUNNING_IN_CI: true
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Cache tools
uses: actions/cache@v4
with:
path: |
bin/
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-tools-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install tools
run: |
echo "::group::Installing development tools"
make tools
echo "::endgroup::"
- name: Build and test
run: |
echo "::group::Building project"
make build
echo "::endgroup::"
echo "::group::Running tests"
make test
echo "::endgroup::"