Skip to content

Commit

Permalink
Adding Rootstock Integration Tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoreliovlabs committed Aug 28, 2024
1 parent 01bb758 commit 36bac04
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/rit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Rootstock Integration Tests

on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- "master"
- "*-rc"
issue_comment:
types:
- created
- edited

jobs:
rootstock-integration-tests:
name: Rootstock Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Get PR Description
id: get-pr
if: github.event_name == 'pull_request'
run: |
PR_DESC=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}" \
| jq -r '.body')
echo "PR_DESC=$PR_DESC" >> $GITHUB_ENV
- name: Parse Branches from PR Description
id: parse-branches
if: github.event_name == 'pull_request'
run: |
echo "rskj-branch=$(echo "$PR_DESC" | grep -oP 'rskj:\K\w+')" >> $GITHUB_ENV
echo "powpeg-node-branch=$(echo "$PR_DESC" | grep -oP 'powpeg-node:\K\w+')" >> $GITHUB_ENV
- name: Test execution
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '/pipeline:run')) ||
(github.event_name == 'pull_request')
uses: rsksmart/rootstock-integration-tests@v1
with:
rskj-branch: ${{ env.rskj-branch || github.head_ref || 'master' }}
powpeg-node-branch: ${{ env.powpeg-node-branch || 'master' }}

0 comments on commit 36bac04

Please sign in to comment.