-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.23 KB
/
ci.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
name: ci
on:
push:
branches:
- 'master'
pull_request:
jobs:
test:
name: Run Tests
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.23.x', '1.22.x' ]
services:
cassandra:
image: upfluence/cassandra
env:
CASSANDRA_CLUSTER_NAME: "dev-env"
LOCAL_ENV: true
options: >-
--health-cmd "nc -z 127.0.0.1 7199"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 9042:9042
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: false
- name: Checkout
uses: actions/checkout@v4
- name: Cache Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-v1-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run tests
run: go test -p 1 -v ./...
env:
CASSANDRA_KEYSPACE: cql_test
release:
needs: test
if: github.ref == 'refs/heads/master'
uses: upfluence/actions/.github/workflows/lib-any-release.yml@master
secrets: inherit