-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.28 KB
/
build-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
46
47
48
49
50
51
52
53
54
55
56
57
name: Build And Test
on:
push:
# Does not run on a tag push
branches:
- "*"
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
Build:
strategy:
matrix:
go-version: [1.21.0]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Fetch Repository
uses: actions/checkout@v2
- name: Tidy
run: go mod tidy
- name: Build
run: ./scripts/build.sh
- name: Test
run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic
docker-build:
runs-on: ubuntu-latest
steps:
- name: Fetch Repository
uses: actions/checkout@v3
- name: Build Image
run: make docker-build
- name: Run Image
run: make docker-run
- name: Deploy Image
run: echo 'TODO'
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54