forked from kube-burner/kube-burner
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (82 loc) · 2.45 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Go
on:
push:
branches: [ master ]
paths-ignore:
- "**.md"
- "examples/**"
- "hack/**"
pull_request:
branches: [ master ]
paths-ignore:
- "**.md"
- "examples/**"
- "hack/**"
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
golang-version: [1.16]
k8s-version:
- v1.20.0
- v1.19.0
- v1.18.0
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{matrix.golang-version}}
id: go
- uses: actions/checkout@v2
- name: Cache prometheus
uses: actions/cache@v2
with:
path: prometheus-2.22.0.linux-amd64
key: prometheus
- name: Download prometheus
run: |
[[ -f prometheus-2.22.0.linux-amd64/prometheus ]] || curl -sSL https://github.com/prometheus/prometheus/releases/download/v2.22.0/prometheus-2.22.0.linux-amd64.tar.gz | tar xz
- name: Run prometheus
run: |
pushd prometheus-2.22.0.linux-amd64
./prometheus --storage.tsdb.path=/tmp/promdata 2>/dev/null &
- name: Build
run: make build
- name: Build container images
run: make images
env:
VERSION: snapshot
- name: Install
run: sudo make install
- name: Setup kind
working-directory: test
run: ./setup-kind.sh
env:
KIND_VERSION: v0.11.1
K8S_VERSION: ${{matrix.k8s-version}}
- name: Execute kube-burner test
working-directory: test
run: ./run.sh
lint:
name: Run golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run golangci-lint
# You may pin to the exact commit or the version.
# uses: golangci/golangci-lint-action@04eca2038305127fb1e6683425b6864cd5612f2d
uses: golangci/golangci-lint-action@v3
with:
# version of golangci-lint to use in form of v1.2.3
version: v1.32
# if set to true and the action runs on a pull request - the action outputs only newly found issues
only-new-issues: true
# golangci-lint command line arguments
#args: # optional, default is
# golangci-lint working directory, default is project root
#working-directory: # optional
# the token is used for fetching patch of a pull request to show only new issues
#github-token: # default is ${{ github.token }}