-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (39 loc) · 1.03 KB
/
go.yml
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
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
name: Lint Test and Build
runs-on: ubuntu-latest
steps:
- name:
uses: actions/checkout@v4
- name: Pull tags and refs
run: git fetch --prune --unshallow
- name: Check if version is updated
run: |
export ExpectedVersion=$(git describe --tags --abbrev=0)
export DefinedVersion=$(cat cmd/gemini/Version)
if [ "$ExpectedVersion" != "$DefinedVersion" ]; then
echo "Expect to have '$ExpectedVersion', but got '$DefinedVersion'"
exit 1
fi
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Linting
run: make check
- name: Set up gotestfmt
uses: GoTestTools/gotestfmt-action@v2
with:
repo: gotestfmt
version: v2.2.0
- name: Unit Tests
run: make test
- name: Build
run: make build