mirror of
https://github.com/facebook/lexical.git
synced 2025-08-06 16:39:33 +08:00
[Lexical ] run tests on approval if there is no extended-tests label manually added (#6198)
This commit is contained in:
26
.github/workflows/after-approval.yml
vendored
26
.github/workflows/after-approval.yml
vendored
@ -1,26 +0,0 @@
|
|||||||
name: After Approval
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_review:
|
|
||||||
types: [submitted]
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
label-pr:
|
|
||||||
if: github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'extended-tests')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- name: Add label for extended tests
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.LEXICAL_BOT_TOKEN }}
|
|
||||||
GH_REPO: ${{ github.repository }}
|
|
||||||
NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
run: |
|
|
||||||
echo "Adding label 'extended-tests' to PR $NUMBER"
|
|
||||||
gh pr edit "$NUMBER" --add-label "extended-tests" || (echo "Failed to add label" && exit 1)
|
|
6
.github/workflows/tests-extended.yml
vendored
6
.github/workflows/tests-extended.yml
vendored
@ -7,6 +7,8 @@ on:
|
|||||||
- 'packages/lexical-website/**'
|
- 'packages/lexical-website/**'
|
||||||
- 'packages/*/README.md'
|
- 'packages/*/README.md'
|
||||||
- '.size-limit.js'
|
- '.size-limit.js'
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -14,9 +16,9 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
if: github.repository_owner == 'facebook' && contains(github.event.pull_request.labels.*.name, 'extended-tests')
|
if: (github.repository_owner == 'facebook' && contains(github.event.pull_request.labels.*.name, 'extended-tests')) || (github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'extended-tests'))
|
||||||
uses: ./.github/workflows/call-e2e-all-tests.yml
|
uses: ./.github/workflows/call-e2e-all-tests.yml
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
if: github.repository_owner == 'facebook' && contains(github.event.pull_request.labels.*.name, 'extended-tests')
|
if: (github.repository_owner == 'facebook' && contains(github.event.pull_request.labels.*.name, 'extended-tests')) || (github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'extended-tests'))
|
||||||
uses: ./.github/workflows/call-integration-tests.yml
|
uses: ./.github/workflows/call-integration-tests.yml
|
||||||
|
Reference in New Issue
Block a user