forked from mantzas/patron
-
Notifications
You must be signed in to change notification settings - Fork 67
68 lines (56 loc) · 1.57 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
lint:
name: Lint and fmt check
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Linting and fmt check
run: make lint
build:
name: CI on Go ${{ matrix.go-image-version}}
strategy:
matrix:
go-image-version: ["1.21"]
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ matrix.go-image-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-image-version }}
- name: Check out source code
uses: actions/checkout@v4
- name: Start dependencies
run: make deps-start
- name: Wait dependencies
run: sleep 60
- name: Running CI
run: make ci
- name: Convert coverage file to lcov
run: |
GO111MODULE=off go get -u github.com/jandelgado/gcov2lcov
$(go env GOPATH)/bin/gcov2lcov -infile=coverage.txt -outfile=coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov
- name: e2e - Starting service
run: |
go build .
nohup ./service &
working-directory: ./examples/service
- name: e2e - Starting client
run: |
go run main.go
working-directory: ./examples/client