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 29, 2024
1 parent 01bb758 commit e38e36f
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/rit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Rootstock Integration Tests

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

jobs:
rootstock-integration-tests:
name: Rootstock Integration Tests
if: github.event.pull_request
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out the code
uses: actions/checkout@v3

- 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 }}
echo "PR Number: $PR_NUMBER"
PR_DESC=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER")
echo "PR Description: $PR_DESC"
# Extract and print the branch names
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"
echo "fed_branch: $fed_branch"
echo "rit_branch: $rit_branch"
# Set environment variables for the next steps
echo "RSKJ_BRANCH=$rskj_branch" >> $GITHUB_ENV
echo "FED_BRANCH=$fed_branch" >> $GITHUB_ENV
echo "RIT_BRANCH=$rit_branch" >> $GITHUB_ENV
- name: Echo Environment Variables
run: |
echo "RSKJ_BRANCH=${{ env.RSKJ_BRANCH }}"
echo "FED_BRANCH=${{ env.FED_BRANCH }}"
echo "RIT_BRANCH=${{ env.RIT_BRANCH }}"
- name: Test execution
if: contains(github.event.comment.body, '/pipeline:run')
uses: rsksmart/rootstock-integration-tests@v1
with:
rskj-branch: ${{ env.RSKJ_BRANCH }}
powpeg-node-branch: ${{ env.FED_BRANCH }}
rit-branch: ${{ env.RIT_BRANCH }}

0 comments on commit e38e36f

Please sign in to comment.