Skip to content

Adding Rootstock Integration Tests workflow #13

Adding Rootstock Integration Tests workflow

Adding Rootstock Integration Tests workflow #13

Workflow file for this run

name: Rootstock Integration Tests
on:
pull_request:
branches:
- "master"
- "*-rc"
issue_comment:
types:
- created
- edited
jobs:
rootstock-integration-tests:
name: Rootstock Integration Tests
if: contains(github.event.comment.body, '/pipeline:run') || github.event.action == 'opened'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout rskj Repository
uses: actions/checkout@v3
with:
repository: rsksmart/rskj
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1
- name: Print GitHub Event Information
run: |
echo "GitHub Event Name: ${{ github.event_name }}"
echo "GitHub Event Action: ${{ github.event.action }}"
echo "GitHub Repository: ${{ github.repository }}"
echo "GitHub Ref: ${{ github.ref }}"
echo "GitHub PR Number: ${{ github.event.pull_request.number }}"
echo "GitHub Comment Body: ${{ github.event.comment.body }}"
- name: Get PR Description
id: get-pr-description
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
PR_DESC=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER")
rskj_branch=$(echo "$PR_DESC" | jq -r '.body | select(test("rskj:")) | split(" ") | .[1]')
fed_branch=$(echo "$PR_DESC" | jq -r '.body | select(test("fed:")) | split(" ") | .[1]')
rit_branch=$(echo "$PR_DESC" | jq -r '.body | select(test("rit:")) | split(" ") | .[1]')
echo "RSKJ_BRANCH=$rskj_branch" >> $GITHUB_ENV
echo "FED_BRANCH=$fed_branch" >> $GITHUB_ENV
echo "RIT_BRANCH=$rit_branch" >> $GITHUB_ENV
- name: Checkout Rootstock Integration Tests Repository
uses: actions/checkout@v3
with:
repository: rsksmart/rootstock-integration-tests
ref: ${{ env.RIT_BRANCH }}
fetch-depth: 1
- name: Run Rootstock Integration Tests
if: contains(github.event.comment.body, '/pipeline:run') || github.event.action == 'opened'
uses: rsksmart/rootstock-integration-tests@v1
with:
rskj-branch: ${{ env.RSKJ_BRANCH }}
powpeg-node-branch: ${{ env.FED_BRANCH }}
- name: Notify on Status
run: echo "Rootstock Integration Tests pipeline triggered"