-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.15 KB
/
build.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
name: "Unit and integration tests"
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.20.x, 1.21.x]
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379
redis-replica:
# Docker Hub image
image: redis
#
options: >-
--health-cmd "redis-cli -p 6380 replicaof localhost 6380" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6380:6379
steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Test
run: make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}