Skip to content

Commit b1b14bd

Browse files
committed
add linux ci
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
1 parent f8cc036 commit b1b14bd

File tree

8 files changed

+340
-206
lines changed

8 files changed

+340
-206
lines changed

.github/workflows/linux.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Linux
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- beta
8+
- stable
9+
tags-ignore:
10+
- "**"
11+
paths-ignore:
12+
- "**.md"
13+
- "**.yaml"
14+
- "**.yml"
15+
pull_request:
16+
paths-ignore:
17+
- "**.md"
18+
- "**.yaml"
19+
- "**.yml"
20+
21+
jobs:
22+
golang:
23+
name: Build (Go ${{ matrix.go }}, OS ${{matrix.os}})
24+
runs-on: ${{ matrix.os }}
25+
timeout-minutes: 60
26+
strategy:
27+
fail-fast: true
28+
matrix:
29+
go: ["1.17.7"]
30+
os: ["ubuntu-latest"]
31+
steps:
32+
- name: Set up Go ${{ matrix.go }}
33+
uses: actions/setup-go@v2 # action page: <https://github.com/actions/setup-go>
34+
with:
35+
go-version: ${{ matrix.go }}
36+
37+
- name: Check out code
38+
uses: actions/checkout@v2
39+
40+
- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
41+
uses: actions/cache@v2
42+
with:
43+
path: ~/go/pkg/mod
44+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
45+
restore-keys: ${{ runner.os }}-go-
46+
47+
- name: Install Go dependencies
48+
run: go mod download
49+
50+
- name: Run golang tests with coverage
51+
run: make test

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ SHELL = /bin/sh
77
test_coverage:
88
rm -rf coverage-ci
99
mkdir ./coverage-ci
10-
go test -v -race -cover -tags=debug -coverpkg=./... -failfast -coverprofile=./coverage-ci/pipeline_jobs.out -covermode=atomic ./plugins/v2/jobs/pipeline
10+
go test -v -race -cover -tags=debug -coverpkg=./... -failfast -coverprofile=./coverage-ci/pipeline_jobs.out -covermode=atomic ./plugins/jobs/pipeline
1111
echo 'mode: atomic' > ./coverage-ci/summary.txt
1212
tail -q -n +2 ./coverage-ci/*.out >> ./coverage-ci/summary.txt
1313

1414
test: ## Run application tests
15-
go test -v -race -tags=debug ./plugins/v2/jobs/pipeline
15+
go test -v -race -tags=debug ./plugins/jobs/pipeline
1616

1717
generate-proto:
1818
protoc -I./proto/jobs/v1beta --go_out=./proto/jobs/v1beta jobs.proto

go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
199199
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
200200
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
201201
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
202+
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
202203
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
203204
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
204205
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

proto/cache/v1beta/response.pb.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)