Skip to content

Commit

Permalink
fixing full testing
Browse files Browse the repository at this point in the history
Signed-off-by: avifenesh <aviarchi1994@gmail.com>
  • Loading branch information
avifenesh committed Nov 5, 2024
1 parent 2b6578a commit 5cd0b20
Showing 1 changed file with 19 additions and 47 deletions.
66 changes: 19 additions & 47 deletions .github/workflows/full-matrix-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5cd0b20

Please sign in to comment.