2021-03-23 11:28:25 +03:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-05-19 12:43:31 +03:00
|
|
|
branches: [master, v9]
|
2021-03-23 11:28:25 +03:00
|
|
|
pull_request:
|
2021-04-27 10:04:46 +03:00
|
|
|
branches: [master, v9]
|
2021-03-23 11:28:25 +03:00
|
|
|
|
2022-04-20 18:48:57 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-03-23 11:28:25 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2021-09-27 12:08:34 +03:00
|
|
|
fail-fast: false
|
2021-03-23 11:28:25 +03:00
|
|
|
matrix:
|
2023-05-02 12:00:44 +03:00
|
|
|
go-version: [1.18.x, 1.19.x, 1.20.x]
|
|
|
|
redis-version: ['5.0.14', '6.0.19', '6.2.12', '7.0.11', '7.2-rc1']
|
2021-03-23 11:28:25 +03:00
|
|
|
|
|
|
|
services:
|
|
|
|
redis:
|
2023-05-02 12:00:44 +03:00
|
|
|
image: redis:${{matrix.redis-version}}
|
2021-03-23 11:28:25 +03:00
|
|
|
options: >-
|
|
|
|
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up ${{ matrix.go-version }}
|
2023-03-20 08:35:49 +03:00
|
|
|
uses: actions/setup-go@v4
|
2021-03-23 11:28:25 +03:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2022-03-07 04:24:03 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-03-23 11:28:25 +03:00
|
|
|
|
|
|
|
- name: Test
|
2023-05-02 12:00:44 +03:00
|
|
|
run: make test REDIS_VERSION=${{matrix.redis-version}}
|