-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Rootstock Integration Tests workflow
- Loading branch information
1 parent
01bb758
commit e38e36f
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |