diff --git a/.github/workflows/periodic.yml b/.github/workflows/periodic.yml new file mode 100644 index 00000000..9c8970ed --- /dev/null +++ b/.github/workflows/periodic.yml @@ -0,0 +1,28 @@ +name: Periodic workflow run + +on: + schedule: + - cron: "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 }}