From cf83855317c7d9032b40366e3ff71ef5db4da775 Mon Sep 17 00:00:00 2001 From: Ariel Mendelzon Date: Wed, 8 Nov 2023 01:26:17 +1300 Subject: [PATCH] Periodic workflow run for unit and integration tests --- .github/workflows/periodic.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/run-tests.yml | 18 ++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/periodic.yml diff --git a/.github/workflows/periodic.yml b/.github/workflows/periodic.yml new file mode 100644 index 00000000..9d2f9c61 --- /dev/null +++ b/.github/workflows/periodic.yml @@ -0,0 +1,28 @@ +name: Periodic workflow run + +on: + schedule: + - cron: "30 14 * * *" #"17 6 * * *" + +jobs: + run-tests-on-branches: + name: "Run tests on stable branches" + + strategy: + matrix: + branch: [{ + main: master, + int_tests: 4.0.0.plus, + }, { + main: develop-2.3, + int_tests: 2.3.0.plus, + }] + + uses: ./.github/workflows/run-tests.yml + with: + branch: ${{ matrix.branch.main }} + it_branch: ${{ matrix.branch.int_tests }} + secrets: inherit + + + diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b1256536..549a831a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,6 +1,17 @@ name: Run tests -on: [push] +on: + push: + workflow_call: + inputs: + branch: + description: "The branch on which to run this workflow" + required: true + type: string + it_branch: + description: "The integration tests branch on which to run this workflow" + required: true + type: string jobs: run-unit-tests: @@ -10,6 +21,8 @@ jobs: steps: - name: Checkout this repo uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} - name: Build the middleware docker image run: docker/mware/build @@ -49,6 +62,7 @@ jobs: uses: actions/checkout@v3 with: path: rsk-powhsm + ref: ${{ inputs.branch }} - name: Build required software working-directory: rsk-powhsm @@ -62,7 +76,7 @@ jobs: uses: actions/checkout@v3 with: repository: rootstock/hsm-integration-test - ref: 4.0.0.plus + ref: ${{ inputs.it_branch || '4.0.0.plus' }} path: hsm-integration-test ssh-key: ${{ secrets.HSM_INTEGRATION_TEST_SSH_KEY }}