From 5cd0b208cd33f2b67e2bcb911804d30827488af4 Mon Sep 17 00:00:00 2001 From: avifenesh Date: Tue, 5 Nov 2024 09:55:03 +0000 Subject: [PATCH] fixing full testing Signed-off-by: avifenesh --- .github/workflows/full-matrix-tests.yml | 66 +++++++------------------ 1 file changed, 19 insertions(+), 47 deletions(-) diff --git a/.github/workflows/full-matrix-tests.yml b/.github/workflows/full-matrix-tests.yml index 85fa3dbe08..ce812dc0fd 100644 --- a/.github/workflows/full-matrix-tests.yml +++ b/.github/workflows/full-matrix-tests.yml @@ -41,86 +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