-
Notifications
You must be signed in to change notification settings - Fork 642
148 lines (133 loc) · 3.97 KB
/
main.yml
File metadata and controls
148 lines (133 loc) · 3.97 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Build
on:
push:
branches:
- trunk
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22', '1.23' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Run linting
run: make check
- name: Run unit tests
run: make test-unit
integration-cassandra:
timeout-minutes: 15
needs:
- build
name: Integration Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ '1.22', '1.23' ]
cassandra_version: [ '4.1.6', '5.0.3' ]
auth: [ "false" ]
compressor: [ "no-compression", "snappy", "lz4" ]
tags: [ "cassandra", "integration", "ccm" ]
proto_version: [ "4", "5" ]
exclude:
- proto_version: "5"
compressor: "snappy"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: Makefile
- name: Set up cache for SDKMAN
uses: actions/cache@v3
with:
path: ~/.sdkman
key: ${{ runner.os }}-sdkman
- name: Set up cache for CCM
uses: actions/cache@v4
with:
path: ~/.ccm/repository
key: ${{ runner.os }}-ccm-${{ matrix.cassandra_version }}
- name: Start cassandra nodes
env:
CASSANDRA_VERSION: ${{ matrix.cassandra_version }}
run: |
make cassandra-start
sleep 30s
- name: Integration tests
env:
CASSANDRA_VERSION: ${{ matrix.cassandra_version }}
TEST_CQL_PROTOCOL: ${{ matrix.proto_version }}
TEST_COMPRESSOR: ${{ matrix.compressor }}
TEST_INTEGRATION_TAGS: ${{ matrix.tags }}
run: |
make test-integration
- name: 'Save ccm logs'
if: 'failure()'
uses: actions/upload-artifact@v4
with:
name: ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}-proto-version-${{ matrix.proto_version }}-compressor-${{ matrix.compressor }}
path: /home/runner/.ccm/gocql_integration_test
retention-days: 5
integration-auth-cassandra:
timeout-minutes: 15
needs:
- build
name: Integration Tests with auth
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ '1.22', '1.23' ]
cassandra_version: [ '4.0.13' ]
compressor: [ "no-compression", "snappy", "lz4" ]
tags: [ "integration" ]
proto_version: [ "4", "5" ]
exclude:
- proto_version: "5"
compressor: "snappy"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: Makefile
- name: Set up cache for SDKMAN
uses: actions/cache@v3
with:
path: ~/.sdkman
key: ${{ runner.os }}-sdkman
- name: Set up cache for CCM
uses: actions/cache@v4
with:
path: ~/.ccm/repository
key: ${{ runner.os }}-ccm-${{ matrix.cassandra_version }}
- name: Start cassandra nodes
env:
CASSANDRA_VERSION: ${{ matrix.cassandra_version }}
run: |
make cassandra-start
sleep 30s
- name: Integration tests
env:
CASSANDRA_VERSION: ${{ matrix.cassandra_version }}
TEST_CQL_PROTOCOL: ${{ matrix.proto_version }}
TEST_COMPRESSOR: ${{ matrix.compressor }}
TEST_INTEGRATION_TAGS: ${{ matrix.tags }}
run: |
make test-integration-auth