diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index de65828a95..4f644577e0 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -32,6 +32,26 @@ on: use_git_ref: description: "git branch or sha to use" default: "unstable" + workflow_call: + inputs: + skipjobs: + type: string + default: "" + skiptests: + type: string + default: "" + test_args: + type: string + default: "" + cluster_test_args: + type: string + default: "" + use_repo: + type: string + default: "valkey-io/valkey" + use_git_ref: + type: string + default: "unstable" concurrency: group: daily-${{ github.head_ref || github.ref }} @@ -45,20 +65,22 @@ jobs: runs-on: ubuntu-latest if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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(inputs.skipjobs || github.event.inputs.skipjobs, 'ubuntu') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -68,19 +90,19 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest') run: ./src/valkey-unit-tests --accurate - name: install Redis OSS 6.2 server for compatibility testing run: | @@ -113,20 +135,22 @@ jobs: runs-on: ubuntu-24.04-arm if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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')) + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'ubuntu') && !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'arm') timeout-minutes: 14400 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -136,40 +160,42 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'fortify') container: ubuntu:plucky timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -182,39 +208,41 @@ jobs: - name: testprep run: apt-get install -y tcl8.6 tclx procps - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'malloc') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -224,36 +252,38 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'malloc') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -263,36 +293,38 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, '32bit') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -304,41 +336,43 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') run: | make -C tests/modules 32bit # the script below doesn't have an argument, we must build manually ahead of time - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || 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 == 'merge_group' || (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(inputs.skipjobs || github.event.inputs.skipjobs, 'tls') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -351,40 +385,42 @@ jobs: sudo apt-get install tcl8.6 tclx tcl-tls ./utils/gen-test-certs.sh - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') run: | - ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs --tls --dump-logs ${{github.event.inputs.test_args}} + ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs --tls --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --tls --dump-logs ${{github.event.inputs.test_args}} + CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --tls --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') run: | - ./runtest-sentinel --tls ${{github.event.inputs.cluster_test_args}} + ./runtest-sentinel --tls ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') run: | - ./runtest-cluster --tls ${{github.event.inputs.cluster_test_args}} + ./runtest-cluster --tls ${{inputs.cluster_test_args || 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 == 'merge_group' || (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(inputs.skipjobs || github.event.inputs.skipjobs, 'tls') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -397,40 +433,42 @@ jobs: sudo apt-get install tcl8.6 tclx tcl-tls ./utils/gen-test-certs.sh - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') run: | - ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') run: | - ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') run: | - ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'iothreads') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -441,30 +479,32 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --io-threads --accurate --verbose --tags network --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --io-threads --accurate --verbose --tags network --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster --io-threads ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster --io-threads ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'tls') && !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'iothreads') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -477,32 +517,34 @@ jobs: sudo apt-get install tcl8.6 tclx tcl-tls ./utils/gen-test-certs.sh - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') run: | - ./runtest --io-threads --tls --accurate --verbose --tags network --dump-logs ${{github.event.inputs.test_args}} + ./runtest --io-threads --tls --accurate --verbose --tags network --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') run: | - ./runtest-cluster --io-threads --tls ${{github.event.inputs.cluster_test_args}} + ./runtest-cluster --io-threads --tls ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'specific') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -565,20 +607,22 @@ jobs: runs-on: ubuntu-latest if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'valgrind') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -590,27 +634,30 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx valgrind -y - 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}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{inputs.test_args || 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 == 'merge_group' || (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')) + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'valgrind') && !(contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') && contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest')) + timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -622,10 +669,10 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx valgrind -y - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest') 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 @@ -634,20 +681,22 @@ jobs: runs-on: ubuntu-latest if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'valgrind') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -659,27 +708,29 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx valgrind -y - 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}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{inputs.test_args || 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 == 'merge_group' || (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')) + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'valgrind') && !(contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') && contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest')) timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -691,10 +742,10 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx valgrind -y - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest') 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 @@ -703,9 +754,11 @@ jobs: runs-on: ubuntu-latest if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'sanitizer') timeout-minutes: 1440 strategy: fail-fast: false @@ -715,14 +768,14 @@ jobs: CC: ${{ matrix.compiler }} steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -734,34 +787,36 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx -y - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --accurate --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest') run: ./src/valkey-unit-tests --large-memory - name: large memory tests - if: true && !contains(github.event.inputs.skiptests, 'valkey') && !contains(github.event.inputs.skiptests, 'large-memory') - run: ./runtest --accurate --verbose --dump-logs --large-memory --tags large-memory ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'large-memory') + run: ./runtest --accurate --verbose --dump-logs --large-memory --tags large-memory ${{inputs.test_args || github.event.inputs.test_args || ''}} - 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}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'large-memory') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --large-memory --tags large-memory ${{inputs.test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'sanitizer') timeout-minutes: 1440 strategy: fail-fast: false @@ -771,14 +826,14 @@ jobs: CC: ${{ matrix.compiler }} steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -790,47 +845,49 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx -y - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --accurate --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'unittest') run: ./src/valkey-unit-tests --accurate --large-memory - name: large memory tests - if: true && !contains(github.event.inputs.skiptests, 'valkey') && !contains(github.event.inputs.skiptests, 'large-memory') - run: ./runtest --accurate --verbose --dump-logs --large-memory --tags large-memory ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'large-memory') + run: ./runtest --accurate --verbose --dump-logs --large-memory --tags large-memory ${{inputs.test_args || github.event.inputs.test_args || ''}} - 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}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'large-memory') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --large-memory --tags large-memory ${{inputs.test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'sanitizer') timeout-minutes: 1440 strategy: fail-fast: false steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -842,39 +899,41 @@ jobs: sudo apt-get update sudo apt-get install tcl8.6 tclx -y - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --accurate --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') + if: true && !contains(inputs.skiptests || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'lttng') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -886,24 +945,26 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} test-rpm-distros-jemalloc: if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'rpm-distros') strategy: fail-fast: false matrix: @@ -930,14 +991,14 @@ jobs: steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -952,24 +1013,26 @@ jobs: - name: testprep run: dnf -y install tcl tcltls - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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(inputs.skipjobs || github.event.inputs.skipjobs, 'tls') strategy: fail-fast: false matrix: @@ -996,14 +1059,14 @@ jobs: steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1020,28 +1083,30 @@ jobs: dnf -y install tcl tcltls ./utils/gen-test-certs.sh - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') run: | - ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs --tls-module --dump-logs ${{github.event.inputs.test_args}} + ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs --tls-module --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --tls-module --dump-logs ${{github.event.inputs.test_args}} + CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --tls-module --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') run: | - ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') run: | - ./runtest-cluster --tls-module ${{github.event.inputs.cluster_test_args}} + ./runtest-cluster --tls-module ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'tls') strategy: fail-fast: false matrix: @@ -1068,14 +1133,14 @@ jobs: steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1092,40 +1157,43 @@ jobs: dnf -y install tcl tcltls ./utils/gen-test-certs.sh - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') run: | - ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} + ./runtest --accurate --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') run: | - ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') run: | - ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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')) + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'macos') && !(contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') && contains(inputs.skiptests || github.event.inputs.skiptests, 'modules')) + timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1133,30 +1201,32 @@ jobs: - name: make run: make SERVER_CFLAGS='-Werror' - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --clients 1 --no-latency --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - 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}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --clients 1 --no-latency --dump-logs ${{inputs.test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'macos') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1164,27 +1234,29 @@ jobs: - name: make run: make SERVER_CFLAGS='-Werror' - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'macos') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') timeout-minutes: 1440 steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1192,8 +1264,8 @@ jobs: - name: make run: make SERVER_CFLAGS='-Werror' - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} build-old-macos-versions: strategy: @@ -1203,23 +1275,25 @@ jobs: runs-on: ${{ matrix.os }} if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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(inputs.skipjobs || github.event.inputs.skipjobs, 'macos') timeout-minutes: 1440 steps: - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 with: xcode-version: latest - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1231,16 +1305,18 @@ jobs: runs-on: macos-13 if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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') + !contains(inputs.skipjobs || 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' || github.event_name == 'merge_group' 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 }} @@ -1261,20 +1337,22 @@ jobs: runs-on: ubuntu-latest if: | (github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + github.event_name == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'alpine') container: alpine:latest steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1286,36 +1364,38 @@ jobs: - name: testprep run: apk add tcl procps tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'alpine') container: alpine:latest steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1327,36 +1407,38 @@ jobs: - name: testprep run: apk add tcl procps tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster ${{inputs.cluster_test_args || 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 == 'merge_group' || (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') + !contains(inputs.skipjobs || github.event.inputs.skipjobs, 'reply-schema') steps: - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_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}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group' + run: | + 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: ${{inputs.skipjobs || github.event.inputs.skipjobs}}" + echo "skiptests: ${{inputs.skiptests || github.event.inputs.skiptests}}" + echo "test_args: ${{inputs.test_args || github.event.inputs.test_args}}" + echo "cluster_test_args: ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args}}" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ env.GITHUB_REPOSITORY }} @@ -1366,23 +1448,24 @@ jobs: - name: testprep run: sudo apt-get install tcl8.6 tclx - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --log-req-res --no-latency --dont-clean --force-resp3 --tags -slow --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'valkey') + run: ./runtest --log-req-res --no-latency --dont-clean --force-resp3 --tags -slow --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --log-req-res --no-latency --dont-clean --force-resp3 --dont-pre-clean --verbose --dump-logs ${{github.event.inputs.test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --log-req-res --no-latency --dont-clean --force-resp3 --dont-pre-clean --verbose --dump-logs ${{inputs.test_args || github.event.inputs.test_args || ''}} - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel --log-req-res --dont-clean --force-resp3 ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + run: ./runtest-sentinel --log-req-res --dont-clean --force-resp3 ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster --log-req-res --dont-clean --force-resp3 ${{github.event.inputs.cluster_test_args}} + if: true && !contains(inputs.skiptests || github.event.inputs.skiptests, 'cluster') + run: ./runtest-cluster --log-req-res --dont-clean --force-resp3 ${{inputs.cluster_test_args || github.event.inputs.cluster_test_args || ''}} - name: Install Python dependencies uses: py-actions/py-dependency-install@30aa0023464ed4b5b116bd9fbdab87acf01a484e # v4.1.0 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(inputs.skiptests || github.event.inputs.skiptests, 'valkey') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'module') && !contains(inputs.skiptests || github.event.inputs.skiptests, 'sentinel') + && !contains(inputs.skiptests || 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 diff --git a/.github/workflows/merge-queue.yml b/.github/workflows/merge-queue.yml new file mode 100644 index 0000000000..0ccde6e0da --- /dev/null +++ b/.github/workflows/merge-queue.yml @@ -0,0 +1,15 @@ +name: Merge Queue + +on: + merge_group: + +jobs: + call-daily-tests: + uses: ./.github/workflows/daily.yml + with: + skipjobs: "valgrind,macos" + skiptests: "" + test_args: "" + cluster_test_args: "" + use_repo: "valkey-io/valkey" + use_git_ref: "unstable"