-
Notifications
You must be signed in to change notification settings - Fork 4
112 lines (91 loc) · 2.61 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: "Build / Lint / Tests"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "**" ]
env:
golang-version: 1.21.4
golangci-lint-version: v1.55.2
docker-registry: ghcr.io
docker-image-name: ${{ github.repository }}
defaults:
run:
shell: bash --noprofile --norc -eo pipefail {0}
jobs:
build:
runs-on: ubuntu-latest
name: "Building, Linting, Formatting"
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.golang-version }}
id: go
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.golangci-lint-version }}
- name: Format
run: |
go install github.com/lluissm/license-header-checker/cmd/[email protected]
make fmt
git diff --exit-code .
- name: Build
run: make build
- name: License Check
run: |
go install github.com/uw-labs/[email protected]
make license-check
unit-test:
name: Tests (Unit)
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: false
go-version: ${{ env.golang-version }}
id: go
- name: Unit-Test
run: make unit-test
test:
strategy:
fail-fast: false
matrix:
pg_version: [ 13, 14, 15 ]
tsdb_version: [ "2.11", "latest" ]
name: Tests (PG) - PG ${{ matrix.pg_version }} / TSDB ${{ matrix.tsdb_version }}
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: false
go-version: ${{ env.golang-version }}
id: go
- name: Test
run: TSES_TEST_PG_VERSION=${{ matrix.pg_version }} TSES_TEST_TSDB_VERSION=${{ matrix.tsdb_version }} make pg-test
integration-test:
strategy:
fail-fast: false
matrix:
test: ["aws-kinesis", "aws-sqs", "kafka", "nats", "redis", "redpanda", "http"]
name: Tests (Int)
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: false
go-version: ${{ env.golang-version }}
id: go
- name: Test
run: TSES_TEST_PG_VERSION=15 make integration-test-${{ matrix.test }}