-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (121 loc) · 3.66 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
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
name: Build and Test
on:
push:
branches: [ 'main', 'feat/**' ]
paths-ignore:
- '**.md' # Don't run CI on markdown changes.
pull_request:
branches: [ 'main', 'feat/**' ]
paths-ignore:
- '**.md'
jobs:
# go-mod-tidy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Go mod tidy
# run: |
# go mod tidy
# git diff --exit-code -- go.mod go.sum
go-versions:
uses: ./.github/workflows/go-versions.yml
# # Runs the common tasks (unit tests, lint, contract tests) for each Go version.
# test-linux:
# name: ${{ format('Linux, Go {0}', matrix.go-version) }}
# needs: go-versions
# strategy:
# # Let jobs fail independently, in case it's a single version that's broken.
# fail-fast: false
# matrix:
# go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
# uses: ./.github/workflows/common_ci.yml
# with:
# go-version: ${{ matrix.go-version }}
#
# test-linux-redis-cluster:
# name: ${{ format('Linux, Go {0} with Redis Cluster', matrix.go-version) }}
# runs-on: ubuntu-latest
# env:
# LD_TEST_REDIS_ADDRESSES: redis-node1:6379 redis-node2:6379 redis-node3:6379
# needs: go-versions
# strategy:
# fail-fast: false
# matrix:
# go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
# services:
# redis-node1:
# image: bitnami/redis-cluster:latest
# env:
# ALLOW_EMPTY_PASSWORD: yes
# REDIS_NODES: redis-node1 redis-node2 redis-node3
# REDIS_CLUSTER_REPLICAS: 0
#
#
# redis-node2:
# image: bitnami/redis-cluster:latest
# env:
# ALLOW_EMPTY_PASSWORD: yes
# REDIS_NODES: redis-node1 redis-node2 redis-node3
# REDIS_CLUSTER_REPLICAS: 0
#
#
# redis-node3:
# image: bitnami/redis-cluster:latest
# env:
# ALLOW_EMPTY_PASSWORD: yes
# REDIS_NODES: redis-node1 redis-node2 redis-node3
# REDIS_CLUSTER_REPLICAS: 0
#
#
# redis-cluster-init:
# image: bitnami/redis-cluster:latest
# env:
# ALLOW_EMPTY_PASSWORD: yes
# REDIS_CLUSTER_CREATOR: yes
# REDIS_NODES: redis-node1 redis-node2 redis-node3
# REDIS_CLUSTER_REPLICAS: 0
#
# container:
# image: ubuntu:22.04
# steps:
# - uses: actions/checkout@v4
# - name: Setup Go ${{ matrix.go-version }}
# uses: actions/setup-go@v5
# with:
# go-version: ${{ matrix.go-version }}
# - name: Deps
# run: |
# apt-get update
# apt-get install -y make curl gcc
# - uses: ./.github/actions/unit-tests
# with:
# upload-results: 'false'
test-windows:
name: ${{ format('Windows, Go {0}', matrix.go-version) }}
runs-on: windows-2022
needs: go-versions
strategy:
fail-fast: false
matrix:
go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: launchdarkly/gh-actions/actions/persistent-stores@95e9994813bee2ecfd05ea0c4e8a5ad8887218dd
with:
redis: true
consul: true
dynamodb: true
- name: Test
run: go test -count=1 -race ./...
test-macos:
runs-on: macos-latest
steps:
- uses: launchdarkly/gh-actions/actions/persistent-stores@95e9994813bee2ecfd05ea0c4e8a5ad8887218dd
with:
redis: true
consul: true
dynamodb: true