diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index de65828a95..c8aa3aed1b 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -1,5 +1,4 @@ name: Daily - on: pull_request: branches: @@ -32,29 +31,58 @@ 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 || inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }} cancel-in-progress: true - permissions: contents: read - jobs: test-ubuntu-jemalloc: runs-on: ubuntu-latest if: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'ubuntu') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -108,21 +136,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && (!contains(github.event.inputs.skipjobs, 'ubuntu') || !contains(github.event.inputs.skipjobs, 'arm')) timeout-minutes: 14400 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -150,11 +177,10 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'fortify') @@ -162,10 +188,10 @@ jobs: timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -196,21 +222,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'malloc') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -235,21 +260,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'malloc') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -274,21 +298,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, '32bit') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -320,21 +343,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'tls') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -366,21 +388,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'tls') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -412,21 +433,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'iothreads') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -446,21 +466,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'tls') && !contains(github.event.inputs.skipjobs, 'iothreads') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -484,21 +503,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'specific') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -560,21 +578,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'valkey') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -592,21 +609,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest')) timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -629,21 +645,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'valkey') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -661,21 +676,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest')) timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -698,11 +712,10 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'sanitizer') @@ -715,10 +728,10 @@ jobs: CC: ${{ matrix.compiler }} steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -754,11 +767,10 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'sanitizer') @@ -771,10 +783,10 @@ jobs: CC: ${{ matrix.compiler }} steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -810,11 +822,10 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'sanitizer') @@ -823,10 +834,10 @@ jobs: fail-fast: false steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -856,21 +867,20 @@ jobs: - name: unittest if: true && !contains(github.event.inputs.skiptests, 'unittest') run: ./src/valkey-unit-tests - test-ubuntu-lttng: runs-on: ubuntu-latest if: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'lttng') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -897,10 +907,9 @@ 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' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'rpm-distros') @@ -921,19 +930,16 @@ 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' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -963,10 +969,9 @@ 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' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'tls') @@ -987,19 +992,16 @@ 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' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1035,10 +1037,9 @@ 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' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && !contains(github.event.inputs.skipjobs, 'tls') @@ -1059,19 +1060,16 @@ 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' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1107,21 +1105,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'macos') && !(contains(github.event.inputs.skiptests, 'valkey') && contains(github.event.inputs.skiptests, 'modules')) timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1138,21 +1135,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'sentinel') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1166,21 +1162,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'cluster') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -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 @@ -1202,7 +1196,7 @@ jobs: os: [macos-13, macos-14] runs-on: ${{ matrix.os }} if: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'macos') @@ -1212,10 +1206,10 @@ jobs: with: xcode-version: latest - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1226,21 +1220,20 @@ jobs: ref: ${{ env.GITHUB_HEAD_REF }} - name: make run: make SERVER_CFLAGS='-Werror' - test-freebsd: runs-on: macos-13 if: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'freebsd') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1256,21 +1249,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'alpine') container: alpine:latest steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1297,21 +1289,20 @@ 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: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'alpine') container: alpine:latest steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1338,21 +1329,20 @@ 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 if: | - (github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'reply-schema') steps: - name: prep - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV echo "skipjobs: ${{github.event.inputs.skipjobs}}" echo "skiptests: ${{github.event.inputs.skiptests}}" echo "test_args: ${{github.event.inputs.test_args}}" @@ -1382,8 +1372,7 @@ jobs: with: 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' || '' }} - + 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.skiptests, 'sentinel') && !contains(github.event.inputs.skiptests, 'cluster')) && (inputs.test_args || github.event.inputs.test_args || '') == '' && (inputs.cluster_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' diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml new file mode 100644 index 0000000000..2e58f4dd99 --- /dev/null +++ b/.github/workflows/weekly.yml @@ -0,0 +1,61 @@ +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, + }); + + 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 }} + skipjobs: "" + skiptests: "" + secrets: inherit