redis/.github/workflows/build.yml

84 lines
1.9 KiB
YAML
Raw Normal View History

2021-03-23 11:28:25 +03:00
name: Go
on:
push:
branches: [master, v9]
2021-03-23 11:28:25 +03:00
pull_request:
branches: [master, v9]
2021-03-23 11:28:25 +03:00
permissions:
contents: read
2021-03-23 11:28:25 +03:00
jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
2021-03-23 11:28:25 +03:00
matrix:
go-version: [1.19.x, 1.20.x, 1.21.x]
2021-03-23 11:28:25 +03:00
services:
redis:
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 }}
uses: actions/setup-go@v5
2021-03-23 11:28:25 +03:00
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
2021-03-23 11:28:25 +03:00
- name: Test
run: make test
- 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: |
docker compose -f src/test/resources/env/docker-compose.yml up -d
- name: Run tests
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" \
--ginkgo.skip-file="gears_commands_test.go" \