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:
|
2024-03-21 11:48:31 +03:00
|
|
|
go-version: [1.19.x, 1.20.x, 1.21.x]
|
2021-03-23 11:28:25 +03:00
|
|
|
|
|
|
|
services:
|
|
|
|
redis:
|
2024-07-31 11:15:15 +03:00
|
|
|
image: redis/redis-stack-server:latest
|
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-12-13 16:54:06 +03:00
|
|
|
uses: actions/setup-go@v5
|
2021-03-23 11:28:25 +03:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2023-09-20 10:41:10 +03:00
|
|
|
uses: actions/checkout@v4
|
2021-03-23 11:28:25 +03:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: make test
|
2024-09-03 17:09:47 +03:00
|
|
|
|
|
|
|
- name: Upload to Codecov
|
|
|
|
uses: codecov/codecov-action@v4
|
|
|
|
with:
|
|
|
|
files: coverage.txt
|
2024-12-15 17:17:48 +03:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
|
|
|
|
test-redis-ce:
|
|
|
|
name: test-redis-ce
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
redis_version:
|
|
|
|
- "8.0-M01"
|
|
|
|
# - "7.4.1"
|
|
|
|
# - "7.2.6"
|
|
|
|
# - "6.2.16"
|
|
|
|
go-version:
|
|
|
|
- "1.19.x"
|
|
|
|
- "1.20.x"
|
|
|
|
- "1.21.x"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up ${{ matrix.go-version }}
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
# Set up Docker Compose environment
|
|
|
|
- name: Set up Docker Compose environment
|
|
|
|
run: |
|
2024-12-15 18:45:37 +03:00
|
|
|
docker compose --profile all up -d --build
|
2024-12-15 17:17:48 +03:00
|
|
|
|
|
|
|
- name: Run tests
|
2024-12-15 18:45:37 +03:00
|
|
|
env:
|
|
|
|
USE_PREBUILT_REDIS: "true"
|
|
|
|
RE_CLUSTER: "true"
|
2024-12-15 17:17:48 +03:00
|
|
|
run: |
|
|
|
|
go test \
|
|
|
|
--ginkgo.skip-file="ring_test.go" \
|
|
|
|
--ginkgo.skip-file="sentinel_test.go" \
|
|
|
|
--ginkgo.skip-file="osscluster_test.go" \
|
|
|
|
--ginkgo.skip-file="pubsub_test.go" \
|
2024-12-15 18:45:37 +03:00
|
|
|
--ginkgo.skip-file="gears_commands_test.go" \
|
|
|
|
--ginkgo.label-filter='!NonRedisEnterprise'
|