-
Notifications
You must be signed in to change notification settings - Fork 32
45 lines (42 loc) · 1.04 KB
/
go-test.yaml
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
name: Unit Tests
on:
push:
branches: [ 'main', 'master' ]
pull_request:
branches: [ 'main', 'master' ]
jobs:
unit-tests:
name: Unit Tests
strategy:
matrix:
go-version: [1.21.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code
uses: actions/checkout@v3
- name: Check uncommitted file changes
run: |
make generate manifests
clean=$(git status --porcelain)
if [[ -z "$clean" ]]; then
echo "Empty git status --porcelain: $clean"
else
echo "Uncommitted file changes detected: $clean"
git diff
exit 1
fi
- name: Run make test
run: |
make test
- name: Run test benchmarks
run: |
make benchmarks