mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
ci: Ignore certain paths for e2e tests for PRs (no-changelog) (#10533)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
This commit is contained in:
parent
7c23101ab8
commit
7d35ebc61e
42
.github/workflows/chromatic.yml
vendored
42
.github/workflows/chromatic.yml
vendored
|
@ -4,19 +4,49 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted]
|
types: [submitted]
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
paths:
|
|
||||||
- packages/design-system/**
|
|
||||||
- .github/workflows/chromatic.yml
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: chromatic-${{ github.event.pull_request.number || github.ref }}
|
group: chromatic-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
get-metadata:
|
||||||
|
name: Get Metadata
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out current commit
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Determine changed files
|
||||||
|
uses: tomi/paths-filter-action@v3.0.2
|
||||||
|
id: changed
|
||||||
|
if: github.event_name == 'pull_request_review'
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
design_system:
|
||||||
|
- packages/design-system/**
|
||||||
|
- .github/workflows/chromatic.yml
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
design_system_files_changed: ${{ steps.changed.outputs.design_system == 'true' }}
|
||||||
|
is_community_pr: ${{ contains(github.event.pull_request.labels.*.name, 'community') }}
|
||||||
|
is_pr_target_master: ${{ github.event.pull_request.base.ref == 'master' }}
|
||||||
|
is_dispatch: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
is_pr_approved: ${{ github.event.review.state == 'approved' }}
|
||||||
|
|
||||||
chromatic:
|
chromatic:
|
||||||
if: ${{ github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'community') }}
|
needs: [get-metadata]
|
||||||
|
if: |
|
||||||
|
needs.get-metadata.outputs.is_dispatch == 'true' ||
|
||||||
|
(
|
||||||
|
needs.get-metadata.outputs.design_system_files_changed == 'true' &&
|
||||||
|
needs.get-metadata.outputs.is_community_pr == 'false' &&
|
||||||
|
needs.get-metadata.outputs.is_pr_target_master == 'true' &&
|
||||||
|
needs.get-metadata.outputs.is_pr_approved == 'true'
|
||||||
|
)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
|
|
3
.github/workflows/ci-postgres-mysql.yml
vendored
3
.github/workflows/ci-postgres-mysql.yml
vendored
|
@ -10,8 +10,6 @@ on:
|
||||||
- .github/workflows/ci-postgres-mysql.yml
|
- .github/workflows/ci-postgres-mysql.yml
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted]
|
types: [submitted]
|
||||||
branches:
|
|
||||||
- 'release/*'
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: db-${{ github.event.pull_request.number || github.ref }}
|
group: db-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
@ -21,6 +19,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Install & Build
|
name: Install & Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name != 'pull_request_review' || startsWith(github.event.pull_request.base.ref, 'release/')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
|
|
44
.github/workflows/e2e-tests-pr.yml
vendored
44
.github/workflows/e2e-tests-pr.yml
vendored
|
@ -3,19 +3,51 @@ name: PR E2E
|
||||||
on:
|
on:
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted]
|
types: [submitted]
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'release/*'
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: e2e-${{ github.event.pull_request.number || github.ref }}
|
group: e2e-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
get-metadata:
|
||||||
|
name: Get Metadata
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out current commit
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Determine changed files
|
||||||
|
uses: tomi/paths-filter-action@v3.0.2
|
||||||
|
id: changed
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
not_ignored:
|
||||||
|
- '!.devcontainer/**'
|
||||||
|
- '!.github/*'
|
||||||
|
- '!.github/scripts/*'
|
||||||
|
- '!.github/workflows/benchmark-*'
|
||||||
|
- '!.github/workflows/check-*'
|
||||||
|
- '!.vscode/**'
|
||||||
|
- '!docker/**'
|
||||||
|
- '!packages/@n8n/benchmark/**'
|
||||||
|
- '!**/*.md'
|
||||||
|
predicate-quantifier: 'every'
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
# The workflow should run when:
|
||||||
|
# - It has changes to files that are not ignored
|
||||||
|
# - It is not a community PR
|
||||||
|
# - It is targeting master or a release branch
|
||||||
|
should_run: ${{ steps.changed.outputs.not_ignored == 'true' && !contains(github.event.pull_request.labels.*.name, 'community') && (github.event.pull_request.base.ref == 'master' || startsWith(github.event.pull_request.base.ref, 'release/')) }}
|
||||||
|
|
||||||
run-e2e-tests:
|
run-e2e-tests:
|
||||||
name: E2E [Electron/Node 18]
|
name: E2E [Electron/Node 18]
|
||||||
uses: ./.github/workflows/e2e-reusable.yml
|
uses: ./.github/workflows/e2e-reusable.yml
|
||||||
if: ${{ github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'community') }}
|
needs: [get-metadata]
|
||||||
|
if: ${{ github.event.review.state == 'approved' && needs.get-metadata.outputs.should_run == 'true' }}
|
||||||
with:
|
with:
|
||||||
pr_number: ${{ github.event.pull_request.number }}
|
pr_number: ${{ github.event.pull_request.number }}
|
||||||
user: ${{ github.event.pull_request.user.login || 'PR User' }}
|
user: ${{ github.event.pull_request.user.login || 'PR User' }}
|
||||||
|
@ -25,11 +57,11 @@ jobs:
|
||||||
post-e2e-tests:
|
post-e2e-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: E2E [Electron/Node 18] - Checks
|
name: E2E [Electron/Node 18] - Checks
|
||||||
needs: [run-e2e-tests]
|
needs: [get-metadata, run-e2e-tests]
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: E2E success comment
|
- name: E2E success comment
|
||||||
if: ${{!contains(github.event.pull_request.labels.*.name, 'community') && needs.run-e2e-tests.outputs.tests_passed == 'true' }}
|
if: ${{ needs.get-metadata.outputs.should_run == 'true' && needs.run-e2e-tests.outputs.tests_passed == 'true' }}
|
||||||
uses: peter-evans/create-or-update-comment@v4.0.0
|
uses: peter-evans/create-or-update-comment@v4.0.0
|
||||||
with:
|
with:
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
|
Loading…
Reference in a new issue