🔥 (WIP) Add valkey workflows and release drafter

This commit is contained in:
Giovanni Rivera
2025-01-03 19:29:33 -08:00
parent a18385a6ba
commit 5d095dc16b
3 changed files with 131 additions and 0 deletions

50
.github/release-drafter-valkey.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name-template: 'Valkey - v$RESOLVED_VERSION'
tag-template: 'valkey/v$RESOLVED_VERSION'
tag-prefix: valkey/v
include-paths:
- valkey
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...valkey/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -0,0 +1,19 @@
name: Release Drafter Valkey
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'valkey/**'
jobs:
draft_release_valkey:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-valkey.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

62
.github/workflows/test-valkey.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
on:
push:
branches:
- master
- main
paths:
- 'valkey/**'
pull_request:
paths:
- 'valkey/**'
name: "Tests Valkey"
jobs:
Tests:
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- 1.20.x
- 1.21.x
redis:
- '7.x'
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Generate TLS certs
run: ./.github/scripts/gen-test-certs.sh
- name: Setup Valkey
uses: shogo82148/actions-setup-redis@v1
with:
distribution: 'valkey'
redis-version: ${{ matrix.redis }}
auto-start: 'false'
redis-port: '6379'
redis-tls-port: '6380'
- name: Run Valkey
run: |
valkey-server --tls-port 6380 --port 6379 \
--tls-cert-file /home/runner/work/storage/storage/tls/valkey.crt \
--tls-key-file /home/runner/work/storage/storage/tls/valkey.key \
--tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt &
- name: Setup Valkey 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: Install Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'
- name: Run Test
run: cd ./valkey && go test ./... -v -race