fix: remove flaky dropdown test (focus/blur input) #85
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
name: Pull request ~ comment | |
on: | |
issue_comment: | |
types: | |
- created | |
jobs: | |
get-pr-info: | |
if: github.event.issue.pull_request != null && startsWith(github.event.comment.body, 'extended test') | |
runs-on: | |
group: infra1-runners-arc | |
labels: runners-small | |
outputs: | |
sha: ${{ steps.get-sha.outputs.sha }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: refs/pull/${{ github.event.issue.number }}/head | |
- name: get-sha | |
id: get-sha | |
run: | | |
SHA=$(git log -1 --format='%H') | |
echo "Comment is $COMMENT" | |
echo "Exporting ${{ github.event.issue.number }} as $SHA" | |
echo "sha=$SHA" >> $GITHUB_OUTPUT | |
env: | |
COMMENT: ${{ github.event.comment.body }} | |
command-started: | |
needs: [get-pr-info] | |
if: ${{ startsWith(github.event.comment.body, 'extended test') }} | |
permissions: | |
pull-requests: write | |
runs-on: | |
group: infra1-runners-arc | |
labels: runners-small | |
steps: | |
- uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const issue_number = context.issue.number; | |
const repository = context.repo; | |
const url = `https://github.com/${repository.owner}/${repository.repo}/actions/runs/${context.runId}`; | |
const message = `"${process.env.COMMENT}" started. Check the progress [here](${url}).`; | |
github.rest.issues.createComment({ | |
owner: repository.owner, | |
repo: repository.repo, | |
issue_number: issue_number, | |
body: message | |
}); | |
env: | |
COMMENT: ${{ github.event.comment.body }} | |
e2e-run-isolated: | |
needs: [get-pr-info] | |
if: ${{ github.event.comment.body == 'extended test - isolated' }} | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: read | |
uses: ./.github/workflows/rw-rush-build-e2e-tests.yml | |
with: | |
source-ref: ${{ needs.get-pr-info.outputs.sha }} | |
secrets: inherit | |
e2e-record: | |
needs: [get-pr-info] | |
if: ${{ github.event.comment.body == 'extended test - record' }} | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: read | |
uses: ./.github/workflows/rw-rush-build-e2e-tests-record.yml | |
with: | |
source-ref: ${{ needs.get-pr-info.outputs.sha }} | |
secrets: inherit | |
e2e-integrated: | |
needs: [get-pr-info] | |
if: ${{ github.event.comment.body == 'extended test - integrated' }} | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: read | |
uses: ./.github/workflows/rw-rush-build-e2e-tests-integrated.yml | |
with: | |
source-ref: ${{ needs.get-pr-info.outputs.sha }} | |
secrets: inherit | |
e2e-backstop: | |
needs: [get-pr-info] | |
if: ${{ github.event.comment.body == 'extended test - backstop' }} | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: read | |
uses: ./.github/workflows/rw-rush-build-e2e-tests-backstop.yml | |
with: | |
source-ref: ${{ needs.get-pr-info.outputs.sha }} | |
secrets: inherit | |
comment-pr: | |
permissions: | |
pull-requests: write | |
needs: [e2e-run-isolated,e2e-record,e2e-integrated,e2e-backstop] | |
if: ${{ !cancelled() && startsWith(github.event.comment.body, 'extended test') }} | |
runs-on: | |
group: infra1-runners-arc | |
labels: runners-small | |
steps: | |
- uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const issue_number = context.issue.number; | |
const repository = context.repo; | |
const url = `https://github.com/${repository.owner}/${repository.repo}/actions/runs/${context.runId}`; | |
let testResult = "'command not recognized'"; | |
if (process.env.COMMENT === 'extended test - isolated') { | |
testResult = process.env.TEST_RESULT_ISOLATED; | |
} | |
if (process.env.COMMENT === 'extended test - record') { | |
testResult = process.env.TEST_RESULT_RECORD; | |
} | |
if (process.env.COMMENT === 'extended test - integrated') { | |
testResult = process.env.TEST_RESULT_INTEGRATED; | |
} | |
if (process.env.COMMENT === 'extended test - backstop') { | |
testResult = process.env.TEST_RESULT_BACKSTOP; | |
} | |
const icon = testResult === 'success' ? '✅' : '❌'; | |
const message = `${icon} "${process.env.COMMENT}" finished with result **${testResult}**. Check the results [here](${url}).`; | |
github.rest.issues.createComment({ | |
owner: repository.owner, | |
repo: repository.repo, | |
issue_number: issue_number, | |
body: message | |
}); | |
env: | |
COMMENT: ${{ github.event.comment.body }} | |
TEST_RESULT_ISOLATED: ${{ needs.e2e-run-isolated.result }} | |
TEST_RESULT_RECORD: ${{ needs.e2e-record.result }} | |
TEST_RESULT_INTEGRATED: ${{ needs.e2e-integrated.result }} | |
TEST_RESULT_BACKSTOP: ${{ needs.e2e-backstop.result }} |