Skip to content

Commit 65bc84c

Browse files
authored
fixing full testing (valkey-io#2601)
Signed-off-by: avifenesh <[email protected]>
1 parent 2b6578a commit 65bc84c

File tree

1 file changed

+19
-47
lines changed

1 file changed

+19
-47
lines changed

.github/workflows/full-matrix-tests.yml

Lines changed: 19 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -41,86 +41,58 @@ on:
4141
- cron: "0 3 * * *"
4242

4343
concurrency:
44-
group: full-matrix-tests
45-
cancel-in-progress: false
44+
group: nightly-${{ github.head_ref || github.ref }}-${{ toJson(inputs) }}
45+
cancel-in-progress: true
4646

4747
# TODO matrix by workflow (`uses`) - not supported yet by GH
4848
jobs:
49-
check-running-workflow:
50-
runs-on: ubuntu-latest
51-
outputs:
52-
is_running: ${{ steps.check.outputs.is_running }}
53-
steps:
54-
- name: Check if the same workflow is running
55-
id: check
56-
uses: actions/github-script@v6
57-
with:
58-
script: |
59-
const { data } = await github.rest.actions.listWorkflowRuns({
60-
owner: context.repo.owner,
61-
repo: context.repo.repo,
62-
workflow_id: context.workflow,
63-
status: 'in_progress',
64-
});
65-
66-
const isRunning = data.workflow_runs.some(run => run.id !== context.runId);
67-
68-
core.setOutput('is_running', isRunning.toString());
69-
7049
check-input:
7150
runs-on: ubuntu-latest
72-
needs: check-running-workflow
73-
if: needs.check-running-workflow.outputs.is_running == 'false'
7451
steps:
75-
- name: No tests selected
76-
run: echo "No tests selected."
77-
if: github.event_name == 'workflow_dispatch' && inputs.core == 'false' && inputs.java == 'false' && inputs.python == 'false' && inputs.node == 'false' && inputs.csharp == 'false' && inputs.go == 'false'
52+
- name: no tests selected
53+
run: false
54+
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
7855

7956
run-full-tests-for-core:
80-
needs: check-running-workflow
81-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.core == 'true'
57+
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.core == true)
8258
uses: ./.github/workflows/rust.yml
8359
name: Run CI for GLIDE core lib
8460
secrets: inherit
8561

8662
run-full-tests-for-redis-rs:
87-
needs: check-running-workflow
88-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.redis-rs == 'true'
63+
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.redis-rs == true)
8964
uses: ./.github/workflows/redis-rs.yml
9065
name: Run CI for Redis-RS client
9166
secrets: inherit
9267

9368
run-full-tests-for-java:
94-
needs: check-running-workflow
95-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.java == 'true'
69+
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.java == true)
9670
uses: ./.github/workflows/java.yml
97-
name: Run CI for Java client
71+
name: Run CI for java client
9872
secrets: inherit
9973

10074
run-full-tests-for-python:
101-
needs: check-running-workflow
102-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.python == 'true'
75+
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.python == true)
10376
uses: ./.github/workflows/python.yml
104-
name: Run CI for Python client
77+
name: Run CI for python client
10578
secrets: inherit
10679

10780
run-full-tests-for-node:
108-
needs: check-running-workflow
109-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.node == 'true'
81+
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.node == true)
11082
uses: ./.github/workflows/node.yml
111-
name: Run CI for Node client
83+
name: Run CI for node client
11284
secrets: inherit
11385

11486
run-full-tests-for-csharp:
115-
needs: check-running-workflow
116-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.csharp == 'true'
87+
# C# deactivated in cron, uncomment condition to activate
88+
#if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.csharp == true)
89+
if: (github.event_name == 'workflow_dispatch' && inputs.csharp == true)
11790
uses: ./.github/workflows/csharp.yml
118-
name: Run CI for C# client
91+
name: Run CI for c# client
11992
secrets: inherit
12093

12194
run-full-tests-for-go:
122-
needs: check-running-workflow
123-
if: needs.check-running-workflow.outputs.is_running == 'false' && inputs.go == 'true'
95+
if: (github.repository_owner == 'valkey-io' && github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.go == true)
12496
uses: ./.github/workflows/go.yml
125-
name: Run CI for Go client
97+
name: Run CI for go client
12698
secrets: inherit

0 commit comments

Comments
 (0)