Skip to content

Commit

Permalink
Periodic workflow run for unit and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amendelzon committed Nov 7, 2023
1 parent 2d0bd06 commit e09f35d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
@@ -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



18 changes: 16 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -49,6 +62,7 @@ jobs:
uses: actions/checkout@v3
with:
path: rsk-powhsm
ref: ${{ inputs.branch }}

- name: Build required software
working-directory: rsk-powhsm
Expand All @@ -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 }}

Expand Down

0 comments on commit e09f35d

Please sign in to comment.