mirror of
https://github.com/gofiber/storage.git
synced 2025-12-24 13:29:30 +08:00
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
paths:
|
|
- 'redis/**'
|
|
pull_request:
|
|
paths:
|
|
- 'redis/**'
|
|
name: "Tests Redis"
|
|
jobs:
|
|
Tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version:
|
|
- 1.19.x
|
|
- 1.20.x
|
|
- 1.21.x
|
|
redis:
|
|
- '6.x'
|
|
- '7.x'
|
|
steps:
|
|
- name: Fetch Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Generate TLS certs
|
|
run: ./.github/scripts/gen-test-certs.sh
|
|
|
|
- name: Add Custom CA cert
|
|
run: sudo cp /home/runner/work/storage/storage/tls/ca.crt /usr/local/share/ca-certificates/custom.crt
|
|
|
|
- name: Trust Custom CA Cert
|
|
run: sudo update-ca-certificates
|
|
|
|
- name: Setup Redis
|
|
uses: shogo82148/actions-setup-redis@v1
|
|
with:
|
|
redis-version: ${{ matrix.redis }}
|
|
auto-start: 'false'
|
|
|
|
- name: Run Redis
|
|
run: |
|
|
redis-server --tls-port 6380 --port 6379 \
|
|
--tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \
|
|
--tls-key-file /home/runner/work/storage/storage/tls/redis.key \
|
|
--tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt &
|
|
|
|
- name: Run Redis instance with MTLS disabled
|
|
run: |
|
|
redis-server --tls-port 16380 --port 16379 \
|
|
--tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \
|
|
--tls-key-file /home/runner/work/storage/storage/tls/redis.key \
|
|
--tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt \
|
|
--tls-auth-clients no &
|
|
|
|
- name: Setup Redis Cluster
|
|
uses: vishnudxb/redis-cluster@1.0.9
|
|
with:
|
|
master1-port: 7000
|
|
master2-port: 7001
|
|
master3-port: 7002
|
|
slave1-port: 7003
|
|
slave2-port: 7004
|
|
slave3-port: 7005
|
|
sleep-duration: 10
|
|
|
|
- name: Wait for Redis to Start
|
|
run: sleep 15
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '${{ matrix.go-version }}'
|
|
|
|
- name: Run Test
|
|
run: cd ./redis && go test ./... -v -race
|