Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 33 additions & 44 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Daily

on:
pull_request:
branches:
Expand Down Expand Up @@ -32,14 +31,43 @@ on:
use_git_ref:
description: "git branch or sha to use"
default: "unstable"

workflow_call:
inputs:
skipjobs:
description: "jobs to skip (delete the ones you wanna keep, do not leave empty)"
required: false
type: string
default: "valgrind,sanitizer,tls,freebsd,macos,alpine,32bit,iothreads,ubuntu,rpm-distros,malloc,specific,fortify,reply-schema,arm,lttng"
skiptests:
description: "tests to skip (delete the ones you wanna keep, do not leave empty)"
required: false
type: string
default: "valkey,modules,sentinel,cluster,unittest,large-memory"
test_args:
description: "extra test arguments"
required: false
type: string
default: ""
cluster_test_args:
description: "extra cluster / sentinel test arguments"
required: false
type: string
default: ""
use_repo:
description: "repo owner and name"
required: false
type: string
default: "valkey-io/valkey"
use_git_ref:
description: "git branch or sha to use"
required: false
type: string
default: "unstable"
concurrency:
group: daily-${{ github.head_ref || github.ref }}
group: daily-${{ github.head_ref || github.event.inputs.use_git_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test-ubuntu-jemalloc:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -108,7 +136,6 @@ jobs:
run: |
sudo apt-get install tcl8.6 tclx
./runtest --verbose --tags compatible-redis --dump-logs --other-server-path tests/tmp/redis-7.0.15/src/redis-server

test-ubuntu-arm:
runs-on: ubuntu-24.04-arm
if: |
Expand Down Expand Up @@ -150,7 +177,6 @@ jobs:
- name: unittest
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: ./src/valkey-unit-tests --accurate

test-ubuntu-jemalloc-fortify:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -196,7 +222,6 @@ jobs:
- name: unittest
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: ./src/valkey-unit-tests --accurate

test-ubuntu-libc-malloc:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -235,7 +260,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-ubuntu-no-malloc-usable-size:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -274,7 +298,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-ubuntu-32bit:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -320,7 +343,6 @@ jobs:
- name: unittest
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: ./src/valkey-unit-tests --accurate

test-ubuntu-tls:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -366,7 +388,6 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: |
./runtest-cluster --tls ${{github.event.inputs.cluster_test_args}}

test-ubuntu-tls-no-tls:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -412,7 +433,6 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: |
./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-ubuntu-io-threads:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -446,7 +466,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster --io-threads ${{github.event.inputs.cluster_test_args}}

test-ubuntu-tls-io-threads:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -484,7 +503,6 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: |
./runtest-cluster --io-threads --tls ${{github.event.inputs.cluster_test_args}}

test-ubuntu-reclaim-cache:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -560,7 +578,6 @@ jobs:
CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
echo "$CACHE"
if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi

test-valgrind-test:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -592,7 +609,6 @@ jobs:
- name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: ./runtest --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}}

test-valgrind-misc:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -629,7 +645,6 @@ jobs:
run: |
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-unit-tests --valgrind
if grep -q 0x err.txt; then cat err.txt; exit 1; fi

test-valgrind-no-malloc-usable-size-test:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -661,7 +676,6 @@ jobs:
- name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: ./runtest --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}}

test-valgrind-no-malloc-usable-size-misc:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -698,7 +712,6 @@ jobs:
run: |
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-unit-tests --valgrind
if grep -q 0x err.txt; then cat err.txt; exit 1; fi

test-sanitizer-address:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -754,7 +767,6 @@ jobs:
- name: large memory module api tests
if: true && !contains(github.event.inputs.skiptests, 'modules') && !contains(github.event.inputs.skiptests, 'large-memory')
run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --large-memory --tags large-memory ${{github.event.inputs.test_args}}

test-sanitizer-undefined:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -810,7 +822,6 @@ jobs:
- name: large memory module api tests
if: true && !contains(github.event.inputs.skiptests, 'modules') && !contains(github.event.inputs.skiptests, 'large-memory')
run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --large-memory --tags large-memory ${{github.event.inputs.test_args}}

test-sanitizer-force-defrag:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -856,7 +867,6 @@ jobs:
- name: unittest
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: ./src/valkey-unit-tests

test-ubuntu-lttng:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -897,7 +907,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-rpm-distros-jemalloc:
if: |
(github.event_name == 'workflow_dispatch' ||
Expand All @@ -921,13 +930,10 @@ jobs:
container: fedora:latest
- name: test-fedorarawhide-jemalloc
container: fedora:rawhide

name: ${{ matrix.name }}
runs-on: ubuntu-latest

container: ${{ matrix.container }}
timeout-minutes: 1440

steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -963,7 +969,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-rpm-distros-tls-module:
if: |
(github.event_name == 'workflow_dispatch' ||
Expand All @@ -987,13 +992,10 @@ jobs:
container: fedora:latest
- name: test-fedorarawhide-tls-module
container: fedora:rawhide

name: ${{ matrix.name }}
runs-on: ubuntu-latest

container: ${{ matrix.container }}
timeout-minutes: 1440

steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -1035,7 +1037,6 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: |
./runtest-cluster --tls-module ${{github.event.inputs.cluster_test_args}}

test-rpm-distros-tls-module-no-tls:
if: |
(github.event_name == 'workflow_dispatch' ||
Expand All @@ -1059,13 +1060,10 @@ jobs:
container: fedora:latest
- name: test-fedorarawhide-tls-module-no-tls
container: fedora:rawhide

name: ${{ matrix.name }}
runs-on: ubuntu-latest

container: ${{ matrix.container }}
timeout-minutes: 1440

steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -1107,7 +1105,6 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: |
./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-macos-latest:
runs-on: macos-latest
if: |
Expand Down Expand Up @@ -1138,7 +1135,6 @@ jobs:
- name: module api test
if: true && !contains(github.event.inputs.skiptests, 'modules')
run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}}

test-macos-latest-sentinel:
runs-on: macos-latest
if: |
Expand Down Expand Up @@ -1166,7 +1162,6 @@ jobs:
- name: sentinel tests
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}

test-macos-latest-cluster:
runs-on: macos-latest
if: |
Expand Down Expand Up @@ -1194,7 +1189,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

build-old-macos-versions:
strategy:
fail-fast: false
Expand Down Expand Up @@ -1226,7 +1220,6 @@ jobs:
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
run: make SERVER_CFLAGS='-Werror'

test-freebsd:
runs-on: macos-13
if: |
Expand Down Expand Up @@ -1256,7 +1249,6 @@ jobs:
sudo pkg install -y bash gmake lang/tcl86 lang/tclx
gmake
./runtest --single unit/keyspace --single unit/auth --single unit/networking --single unit/protocol

test-alpine-jemalloc:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -1297,7 +1289,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

test-alpine-libc-malloc:
runs-on: ubuntu-latest
if: |
Expand Down Expand Up @@ -1338,7 +1329,6 @@ jobs:
- name: cluster tests
if: true && !contains(github.event.inputs.skiptests, 'cluster')
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}

reply-schemas-validator:
runs-on: ubuntu-latest
timeout-minutes: 1440
Expand Down Expand Up @@ -1383,7 +1373,6 @@ jobs:
path: "./utils/req-res-validator/requirements.txt"
- name: validator
run: ./utils/req-res-log-validator.py --verbose --fail-missing-reply-schemas ${{ (!contains(github.event.inputs.skiptests, 'valkey') && !contains(github.event.inputs.skiptests, 'module') && !contains(github.event.inputs.sentinel, 'valkey') && !contains(github.event.inputs.skiptests, 'cluster')) && github.event.inputs.test_args == '' && github.event.inputs.cluster_test_args == '' && '--fail-commands-not-all-hit' || '' }}

notify-about-job-results:
runs-on: ubuntu-latest
if: always() && github.event_name == 'schedule' && github.repository == 'valkey-io/valkey'
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Weekly Test Workflow for Released Branches
on:
schedule:
- cron: '0 6 * * 0'
workflow_dispatch: {}
permissions:
actions: read
contents: read
concurrency:
group: weekly-release-tests
cancel-in-progress: false
jobs:
determine-release-branches:
if: github.repository == 'valkey-io/valkey'
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.release-branches.outputs.branches }}
has-branches: ${{ steps.release-branches.outputs.has-branches }}
steps:
- name: Collect release branches
id: release-branches
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const MIN_MAJOR = 7;
const MIN_MINOR = 2;

const branches = await github.paginate(github.rest.repos.listBranches, {
owner,
repo,
per_page: 100,
});
Comment on lines +30 to +34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why dont we use this kind of filter for branches:

branches:
      - "[0-9].[0-9]"

Then we can filter which versions we want to run on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will support single digit branch numbers right like till 9.1. But as soon as we go 10 (multi digit version), it might break. I am not sure if github workflows supports regex.


const releaseBranches = branches
.map(({ name }) => name)
.filter(name => /^\d+\.\d+$/.test(name))
.filter(name => {
const [major, minor] = name.split('.').map(Number);
return Number.isInteger(major) &&
Number.isInteger(minor) &&
(major > MIN_MAJOR || (major === MIN_MAJOR && minor >= MIN_MINOR));
})
.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));
core.info(`Weekly release branches: ${releaseBranches.join(', ') || '(none)'}`);
core.setOutput('branches', JSON.stringify(releaseBranches));
core.setOutput('has-branches', releaseBranches.length > 0 ? 'true' : 'false');
run-daily-for-release-branches:
needs: determine-release-branches
if: needs.determine-release-branches.outputs.has-branches == 'true' && github.repository == 'valkey-io/valkey'
strategy:
matrix:
release-branch: ${{ fromJson(needs.determine-release-branches.outputs.branches) }}
uses: ./.github/workflows/daily.yml
with:
use_repo: valkey-io/valkey
use_git_ref: ${{ matrix.release-branch }}
secrets: inherit
Loading