-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lexical] Add label to run e2e tests on approve #6120
Changes from all commits
7f0a0ff
cf7cfd1
5dce4b9
32e6a4b
2090554
c1a7820
1b1e33a
d5a56d3
9502cef
30e9d05
8245d32
645a1be
3c2c4e6
d8ff744
608d607
30ab0e6
fc997b7
93b1ef6
5c582dc
b723df7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Add Label to run extended tests on approve | ||
|
||
on: | ||
pull_request_review: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why cancel in progress? |
||
|
||
jobs: | ||
label_pull_requests: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The naming format used for all other workflows is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback, will update the naming conventions |
||
if: github.event.review.state == 'approved' && !contains( github.event.pull_request.labels.*.name, 'extended-tests') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- run: gh pr edit "$NUMBER" --add-label "extended-tests" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
NUMBER: ${{ github.event.pull_request.number }} | ||
e2e-tests: | ||
needs: label_pull_requests | ||
uses: ./.github/workflows/call-e2e-all-tests.yml | ||
Comment on lines
+22
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is right. Once the label is added, it should kick off the other There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested this and found out that 1 GitHub workflow action can't trigger another workflow action and hence this was needed, with a "needs" check , the second job won't run unless 1 job is not skipped. Without this tests don't trigger on approve unless there is a manual action, other way to fix this is use PAT tokens to trigger the 1st job to add labels,but I think we should still use the GitHub action bot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file name of this workflow should be 'add-label-after-approved'. This workflow shouldn't be running e2e tests, just adding a label