Skip to content

Adding Rootstock Integration Tests workflow #45

Adding Rootstock Integration Tests workflow

Adding Rootstock Integration Tests workflow #45

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
permissions:
contents: write
packages: write
issues: read
pull-requests: write
actions: read
deployments: read
steps:
- name: Set Branch Variables
id: set-branch-variables
run: |

Check failure on line 38 in .github/workflows/rit.yml

View workflow run for this annotation

GitHub Actions / Rootstock Integration Tests

Invalid workflow file

The workflow is not valid. .github/workflows/rit.yml (Line: 38, Col: 14): Unexpected symbol: 'ref#refs/heads/'. Located at position 8 within expression: github.ref#refs/heads/
# Default values
RSKJ_BRANCH="unknown"
RIT_BRANCH="${{ github.event.inputs.rit-branch || 'main' }}"
POWPEG_BRANCH="${{ github.event.inputs.powpeg-branch || 'master' }}"
if [[ "${{ github.event_name }}" == "push" ]]; then
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
RSKJ_BRANCH="master"
elif [[ "${{ github.ref }}" =~ refs/heads/(.*)-rc ]]; then
RSKJ_BRANCH="${BASH_REMATCH[1]}-rc"
else
RSKJ_BRANCH="${{ github.ref#refs/heads/ }}"
fi
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
RSKJ_BRANCH="${{ github.event.pull_request.head.ref }}"
fi
echo "RSKJ_BRANCH=$RSKJ_BRANCH" >> $GITHUB_ENV
echo "RIT_BRANCH=$RIT_BRANCH" >> $GITHUB_ENV
echo "POWPEG_BRANCH=$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"