name: Go on: push: branches: [master, v9] pull_request: branches: [master, v9] permissions: contents: read jobs: build: name: build runs-on: ubuntu-latest strategy: fail-fast: false matrix: 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'] services: redis: image: redis:${{matrix.redis-version}} 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@v4 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v3 - name: Test run: make test REDIS_VERSION=${{matrix.redis-version}}