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 2c6aac0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Periodic workflow run

on: [push]

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 }}



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
5 changes: 2 additions & 3 deletions ledger/src/signer/src/bc_advance.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,8 @@ static void bc_mm_header_received() {
if (PROCESSING_BLOCK()) {
// First block: perform blockchain advance prologue
// Otherwise: verify block chains to parent
if (curr_block == 0) {
bc_adv_prologue();
} else if (HNEQ(aux_bc_st.prev_parent_hash, block.block_hash)) {
if (curr_block == 0) { bc_adv_prologue();
} else if (HNEQ(aux_bc_st.prev_parent_hash, block.block_hash)) {
LOG_HEX("PAR", aux_bc_st.prev_parent_hash, HASH_LENGTH);
LOG_HEX("BLK", block.block_hash, HASH_LENGTH);
FAIL(CHAIN_MISMATCH);
Expand Down

0 comments on commit 2c6aac0

Please sign in to comment.