mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 05:47:31 -08:00
ci: Skip e2e tests for community PRs (no-changelog) (#5971)
ci: Skip e2e tests for community PRs
This commit is contained in:
parent
bc1db5e16a
commit
ea8c48ad37
22
.github/workflows/e2e-tests-pr.yml
vendored
22
.github/workflows/e2e-tests-pr.yml
vendored
|
@ -7,24 +7,10 @@ on:
|
||||||
- 'master'
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# We disable this for now because cancelling runs makes the Cypress Cloud tests to hang.
|
|
||||||
# cancel-previous-runs:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# name: 'Cancel previous e2e test runs'
|
|
||||||
# strategy:
|
|
||||||
# matrix:
|
|
||||||
# node-version: [16.x]
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - name: 'Cancel previous runs'
|
|
||||||
# uses: styfle/cancel-workflow-action@0.9.0
|
|
||||||
# with:
|
|
||||||
# access_token: ${{ github.token }}
|
|
||||||
|
|
||||||
run-e2e-tests:
|
run-e2e-tests:
|
||||||
name: E2E [Electron/Node 16]
|
name: E2E [Electron/Node 16]
|
||||||
uses: ./.github/workflows/e2e-reusable.yml
|
uses: ./.github/workflows/e2e-reusable.yml
|
||||||
if: ${{ github.event.review.state == 'approved' }}
|
if: ${{ github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'community') }}
|
||||||
with:
|
with:
|
||||||
branch: ${{ github.event.pull_request.head.ref }}
|
branch: ${{ github.event.pull_request.head.ref }}
|
||||||
user: ${{ github.event.pull_request.user.login || 'PR User' }}
|
user: ${{ github.event.pull_request.user.login || 'PR User' }}
|
||||||
|
@ -40,7 +26,7 @@ jobs:
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: E2E success comment
|
- name: E2E success comment
|
||||||
if: needs.run-e2e-tests.result == 'success'
|
if: ${{!contains(github.event.pull_request.labels.*.name, 'community') || needs.run-e2e-tests.result == 'success' }}
|
||||||
uses: peter-evans/create-or-update-comment@v3
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
with:
|
with:
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
@ -57,6 +43,10 @@ jobs:
|
||||||
:warning: Some Cypress E2E specs are failing, please fix them before merging
|
:warning: Some Cypress E2E specs are failing, please fix them before merging
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Success job if community PR
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'community') }}
|
||||||
|
run: exit 0
|
||||||
|
|
||||||
- name: Fail job if run-e2e-tests failed
|
- name: Fail job if run-e2e-tests failed
|
||||||
if: needs.run-e2e-tests.result == 'failure'
|
if: needs.run-e2e-tests.result == 'failure'
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
Loading…
Reference in a new issue