Skip to content

Commit 61b8e45

Browse files
authored
ci: make the PR merge ready
1 parent da8f5d3 commit 61b8e45

File tree

1 file changed

+69
-71
lines changed

1 file changed

+69
-71
lines changed

.github/workflows/rit.yml

Lines changed: 69 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
name: Rootstock Integration Tests
22

3-
on: pull_request
4-
5-
# on:
6-
# pull_request:
7-
# types: [ opened, synchronize, reopened ]
8-
# branches: [ "master", "*-rc" ]
9-
# workflow_dispatch:
10-
# inputs:
11-
# rit-branch:
12-
# description: 'Branch for Rootstock Integration Tests'
13-
# required: false
14-
# default: 'main'
15-
# rskj-branch:
16-
# description: 'Branch for RSKJ repo'
17-
# required: false
18-
# default: 'master'
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened ]
6+
branches: [ "master", "*-rc" ]
7+
workflow_dispatch:
8+
inputs:
9+
rit-branch:
10+
description: 'Branch for Rootstock Integration Tests'
11+
required: false
12+
default: 'main'
13+
rskj-branch:
14+
description: 'Branch for RSKJ repo'
15+
required: false
16+
default: 'master'
1917

2018
# Declare default permissions as read only.
2119
permissions: read-all
2220

2321
jobs:
2422
rootstock-integration-tests:
2523
name: Rootstock Integration Tests
26-
runs-on: tenki-standard-large-plus-16c-32g
24+
runs-on: tenki-standard-autoscale
2725
timeout-minutes: 120
2826
steps:
2927
- name: Checkout Repository # Step needed to access the PR description using github CLI
@@ -133,58 +131,58 @@ jobs:
133131
rit-branch: ${{ env.RIT_BRANCH }}
134132
repo-owner: ${{ env.REPO_OWNER }}
135133

136-
# - name: Send Slack Notification on Success
137-
# if: success() && github.event.pull_request.head.repo.owner.login == 'rsksmart'
138-
# uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
139-
# with:
140-
# token: ${{ secrets.GHA_SLACK_NOTIFICATION_TOKEN }}
141-
# method: chat.postMessage
142-
# payload: |
143-
# {
144-
# "channel": "${{ vars.GHA_SLACK_NOTIFICATION_CHANNEL }}",
145-
# "blocks": [
146-
# { "type": "header", "text": { "type": "plain_text", "text": "✅ PASSED — ${{ github.repository }} – PR #${{ github.event.pull_request.number }}", "emoji": true } },
147-
# {
148-
# "type": "section",
149-
# "text": { "type": "mrkdwn", "text": "*${{ env.SAFE_PULL_REQUEST_TITLE }}*" },
150-
# "fields": [
151-
# { "type": "mrkdwn", "text": "• rskj: `${{ env.RSKJ_BRANCH }}`\n• fed: `${{ env.POWPEG_BRANCH }}`\n• rit: `${{ env.RIT_BRANCH }}`" }
152-
# ]
153-
# },
154-
# {
155-
# "type": "actions",
156-
# "elements": [
157-
# { "type": "button", "text": { "type": "plain_text", "text": "Open PR" }, "url": "${{ github.event.pull_request.html_url }}" },
158-
# { "type": "button", "text": { "type": "plain_text", "text": "View Actions Run" }, "url": "${{ env.BUILD_URL }}" }
159-
# ]
160-
# }
161-
# ]
162-
# }
163-
164-
# - name: Send Slack Notification on Failure
165-
# if: failure() && github.event.pull_request.head.repo.owner.login == 'rsksmart'
166-
# uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
167-
# with:
168-
# token: ${{ secrets.GHA_SLACK_NOTIFICATION_TOKEN }}
169-
# method: chat.postMessage
170-
# payload: |
171-
# {
172-
# "channel": "${{ vars.GHA_SLACK_NOTIFICATION_CHANNEL }}",
173-
# "blocks": [
174-
# { "type": "header", "text": { "type": "plain_text", "text": "❌ FAILED — ${{ github.repository }} – PR #${{ github.event.pull_request.number }}", "emoji": true } },
175-
# {
176-
# "type": "section",
177-
# "text": { "type": "mrkdwn", "text": "*${{ env.SAFE_PULL_REQUEST_TITLE }}*" },
178-
# "fields": [
179-
# { "type": "mrkdwn", "text": "• rskj: `${{ env.RSKJ_BRANCH }}`\n• fed: `${{ env.POWPEG_BRANCH }}`\n• rit: `${{ env.RIT_BRANCH }}`" }
180-
# ]
181-
# },
182-
# {
183-
# "type": "actions",
184-
# "elements": [
185-
# { "type": "button", "style": "danger", "text": { "type": "plain_text", "text": "Open PR" }, "url": "${{ github.event.pull_request.html_url }}" },
186-
# { "type": "button", "style": "danger", "text": { "type": "plain_text", "text": "View Actions Run" }, "url": "${{ env.BUILD_URL }}" }
187-
# ]
188-
# }
189-
# ]
134+
- name: Send Slack Notification on Success
135+
if: success() && github.event.pull_request.head.repo.owner.login == 'rsksmart'
136+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
137+
with:
138+
token: ${{ secrets.GHA_SLACK_NOTIFICATION_TOKEN }}
139+
method: chat.postMessage
140+
payload: |
141+
{
142+
"channel": "${{ vars.GHA_SLACK_NOTIFICATION_CHANNEL }}",
143+
"blocks": [
144+
{ "type": "header", "text": { "type": "plain_text", "text": "✅ PASSED — ${{ github.repository }} – PR #${{ github.event.pull_request.number }}", "emoji": true } },
145+
{
146+
"type": "section",
147+
"text": { "type": "mrkdwn", "text": "*${{ env.SAFE_PULL_REQUEST_TITLE }}*" },
148+
"fields": [
149+
{ "type": "mrkdwn", "text": "• rskj: `${{ env.RSKJ_BRANCH }}`\n• fed: `${{ env.POWPEG_BRANCH }}`\n• rit: `${{ env.RIT_BRANCH }}`" }
150+
]
151+
},
152+
{
153+
"type": "actions",
154+
"elements": [
155+
{ "type": "button", "text": { "type": "plain_text", "text": "Open PR" }, "url": "${{ github.event.pull_request.html_url }}" },
156+
{ "type": "button", "text": { "type": "plain_text", "text": "View Actions Run" }, "url": "${{ env.BUILD_URL }}" }
157+
]
158+
}
159+
]
160+
}
161+
162+
- name: Send Slack Notification on Failure
163+
if: failure() && github.event.pull_request.head.repo.owner.login == 'rsksmart'
164+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
165+
with:
166+
token: ${{ secrets.GHA_SLACK_NOTIFICATION_TOKEN }}
167+
method: chat.postMessage
168+
payload: |
169+
{
170+
"channel": "${{ vars.GHA_SLACK_NOTIFICATION_CHANNEL }}",
171+
"blocks": [
172+
{ "type": "header", "text": { "type": "plain_text", "text": "❌ FAILED — ${{ github.repository }} – PR #${{ github.event.pull_request.number }}", "emoji": true } },
173+
{
174+
"type": "section",
175+
"text": { "type": "mrkdwn", "text": "*${{ env.SAFE_PULL_REQUEST_TITLE }}*" },
176+
"fields": [
177+
{ "type": "mrkdwn", "text": "• rskj: `${{ env.RSKJ_BRANCH }}`\n• fed: `${{ env.POWPEG_BRANCH }}`\n• rit: `${{ env.RIT_BRANCH }}`" }
178+
]
179+
},
180+
{
181+
"type": "actions",
182+
"elements": [
183+
{ "type": "button", "style": "danger", "text": { "type": "plain_text", "text": "Open PR" }, "url": "${{ github.event.pull_request.html_url }}" },
184+
{ "type": "button", "style": "danger", "text": { "type": "plain_text", "text": "View Actions Run" }, "url": "${{ env.BUILD_URL }}" }
185+
]
186+
}
187+
]
190188
# }

0 commit comments

Comments
 (0)