Skip to content

Adding Rootstock Integration Tests workflow #43

Adding Rootstock Integration Tests workflow

Adding Rootstock Integration Tests workflow #43

Workflow file for this run

name: Rootstock Integration Tests
on:
push:
branches:
- "master"
- "*-rc"
pull_request:
types: [opened, reopened, synchronize]
branches:
- "**"
workflow_dispatch:
inputs:
rit-branch:
description: 'Branch for Rootstock Integration Tests'
required: false
default: 'main'
powpeg-branch:
description: 'Branch for PowPeg Node'
required: false
default: 'master'
jobs:
rootstock-integration-tests:
name: Rootstock Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Set Branch Variables
id: set-branch-variables
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
# Determine branch name for push event
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "RSKJ_BRANCH=master" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == refs/heads/*-rc ]]; then
branch_name="${{ github.head_ref || github.ref_name }} "
echo "RSKJ_BRANCH=$branch_name" >> $GITHUB_ENV
fi
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Use the PR branch name for pull request events
echo "RSKJ_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
fi
echo "RIT_BRANCH=${{ github.event.inputs.rit-branch }}" >> $GITHUB_ENV
echo "POWPEG_BRANCH=${{ github.event.inputs.powpeg-branch }}" >> $GITHUB_ENV
echo "RSKJ_BRANCH=${{ env.RSKJ_BRANCH }}"
echo "RIT_BRANCH=${{ env.RIT_BRANCH }}"
echo "POWPEG_BRANCH=${{ env.POWPEG_BRANCH }}"
- name: Checkout rskj Repository
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
repository: rsksmart/rskj
ref: ${{ env.RSKJ_BRANCH }}
fetch-depth: 1
- name: Checkout Rootstock Integration Tests Repository
uses: actions/checkout@v4
with:
repository: rsksmart/rootstock-integration-tests
ref: ${{ env.RIT_BRANCH }}
fetch-depth: 0
- name: Run Rootstock Integration Tests
uses: rsksmart/rootstock-integration-tests@v1
with:
rskj-branch: ${{ env.RSKJ_BRANCH }}
powpeg-node-branch: ${{ env.POWPEG_BRANCH }}
- name: Notify on Status
run: echo "Rootstock Integration Tests pipeline triggered"