diff --git a/.github/json_matrices/supported-languages-versions.json b/.github/json_matrices/supported-languages-versions.json index cc9c9a5eea..8b22e7b090 100644 --- a/.github/json_matrices/supported-languages-versions.json +++ b/.github/json_matrices/supported-languages-versions.json @@ -22,6 +22,6 @@ { "language": "go", "versions": ["1.22.0", "1.18.10"], - "always-run-versions": ["1.22.0"] + "always-run-versions": ["1.22.0", "1.18.10"] } ] diff --git a/.github/workflows/full-matrix-tests.yml b/.github/workflows/full-matrix-tests.yml index 9ba595f628..8a26e6a75e 100644 --- a/.github/workflows/full-matrix-tests.yml +++ b/.github/workflows/full-matrix-tests.yml @@ -12,10 +12,10 @@ on: description: "Test GLIDE core" type: boolean default: true - # redis-rs: - # description: "Test Redis-RS client" - # type: boolean - # default: true + redis-rs: + description: "Test Redis-RS client" + type: boolean + default: true node: description: "Test Node client" type: boolean @@ -41,83 +41,58 @@ on: - cron: "0 3 * * *" concurrency: - group: full-matrix-tests - cancel-in-progress: false + group: nightly-${{ github.head_ref || github.ref }}-${{ toJson(inputs) }} + cancel-in-progress: true # TODO matrix by workflow (`uses`) - not supported yet by GH jobs: - check-running-workflow: - runs-on: ubuntu-latest - outputs: - is_running: ${{ steps.check.outputs.is_running }} - steps: - - name: Check if the same workflow is running - id: check - uses: actions/github-script@v6 - with: - script: | - const { data } = await github.rest.actions.listWorkflowRuns({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: context.workflow, - status: 'in_progress', - }); - const isRunning = data.workflow_runs.some(run => run.id !== context.runId); - core.setOutput('is_running', isRunning.toString()); check-input: runs-on: ubuntu-latest - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' steps: - - name: No tests selected - run: echo "No tests selected." - if: github.event_name == 'workflow_dispatch' && inputs.core == 'false' && inputs.java == 'false' && inputs.python == 'false' && inputs.node == 'false' && inputs.csharp == 'false' && inputs.go == 'false' + - name: no tests selected + run: false + if: github.event_name == 'workflow_dispatch' && inputs.core == false && inputs.java == false && inputs.python == false && inputs.node == false && inputs.java == false && inputs.csharp == false && inputs.go == false run-full-tests-for-core: - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.core == 'true' + if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.core == true) uses: ./.github/workflows/rust.yml name: Run CI for GLIDE core lib secrets: inherit # run-full-tests-for-redis-rs: - # needs: check-running-workflow - # if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.redis-rs == 'true' + # if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.redis-rs == true) # uses: ./.github/workflows/redis-rs.yml # name: Run CI for Redis-RS client # secrets: inherit run-full-tests-for-java: - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.java == 'true' + if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.java == true) uses: ./.github/workflows/java.yml - name: Run CI for Java client + name: Run CI for java client secrets: inherit run-full-tests-for-python: - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.python == 'true' + if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.python == true) uses: ./.github/workflows/python.yml - name: Run CI for Python client + name: Run CI for python client secrets: inherit run-full-tests-for-node: - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.node == 'true' + if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.node == true) uses: ./.github/workflows/node.yml - name: Run CI for Node client + name: Run CI for node client secrets: inherit run-full-tests-for-csharp: - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.csharp == 'true' + # C# deactivated in cron, uncomment condition to activate + #if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.csharp == true) + if: (github.event_name == 'workflow_dispatch' && inputs.csharp == true) uses: ./.github/workflows/csharp.yml - name: Run CI for C# client + name: Run CI for c# client secrets: inherit run-full-tests-for-go: - needs: check-running-workflow - if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.go == 'true' + if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.go == true) uses: ./.github/workflows/go.yml - name: Run CI for Go client + name: Run CI for go client secrets: inherit