Skip to content
Snippets Groups Projects
Unverified Commit 33e84e0c authored by Aleksandr Lesnenko's avatar Aleksandr Lesnenko Committed by GitHub
Browse files

path filtering for FE, snowplow, presto-kerberos (#28048)

parent cee104be
No related branches found
No related tags found
No related merge requests found
default: &default
- "locales/**"
- "bin/**"
ci: &ci
- ".github/**"
shared_sources: &shared_sources
- "shared/src"
shared_specs: &shared_specs
- "shared/test"
frontend_sources: &frontend_sources
- *shared_sources
- "frontend/**"
- "enterprise/frontend/**"
- "frontend/!(test)/**"
- "yarn.lock"
- "**/tsconfig*.json"
- "package.json"
- "babel.config.json"
- "postcss.config.js"
- "webpack.config.js"
- "webpack.static-viz.config.js"
frontend_specs: &frontend_specs
- *shared_specs
- "frontend/test/!(__support__|__runner__)/**"
- "frontend/**.unit.*"
- "jest.config.js"
frontend_all: &frontend_all
- *ci
- *frontend_sources
- *frontend_specs
backend_presto_kerberos:
- "**/presto_jdbc/**"
- "**/presto_jdbc.clj"
backend_sources: &backend_sources
- *shared_sources
- "**deps.edn"
- "enterprise/backend/src/**"
- "src/**"
- "modules/drivers/{*,*/{*,!(test)/**}}"
- "resources/**"
- ".clj-kondo/**"
backend_specs: &backend_specs
- *shared_specs
- "test/**"
- "enterprise/backend/test/**"
- "test_modules/**"
- "modules/drivers/*/test/**"
- "test_config/**"
- "dev/**"
backend_all: &backend_all
- *default
- *ci
- *backend_sources
- *backend_specs
- *frontend_sources # keep it here until we detect static viz changes
sources: &sources
- *frontend_sources
- *backend_sources
e2e_specs: &e2e_specs
- "**.cy.*.js"
- "frontend/test/__support__/e2e/**"
- "frontend/test/__runner__/*cypress*"
e2e_all:
- *default
- *ci
- *e2e_specs
- *sources
snowplow:
- *ci
- "snowplow/**"
documentation:
- "docs/**"
- "**.md"
# Required checks with path filtering rules will block pull requests from merging if they change only the excluded files.
# This is a workaround to allow the PR to be merged.
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Frontend
on:
push:
branches:
- 'master'
- 'release-**'
paths:
# documentation
- "docs/**"
- "**.md"
# backend
- "enterprise/backend/**"
- "src/**"
- "test/**"
- "*modules/**" # modules/, test_modules/
# E2E
- "**.cy.*.js" # .cy.spec.js, .cy.snap.js
- "frontend/test/__support__/e2e/**"
- "frontend/test/__runner__/*cypress*"
pull_request:
paths:
# documentation
- "docs/**"
- "**.md"
# backend
- "enterprise/backend/**"
- "src/**"
- "test/**"
- "*modules/**" # modules/, test_modules/
# E2E
- "**.cy.*.js" # .cy.spec.js, .cy.snap.js
- "frontend/test/__support__/e2e/**"
- "frontend/test/__runner__/*cypress*"
jobs:
fe-linter-prettier:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- run: |
echo "Didn't run due to conditional filtering"
fe-linter-eslint:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- run: |
echo "Didn't run due to conditional filtering"
fe-type-check:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- run: |
echo "Didn't run due to conditional filtering"
fe-tests-unit:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- run: |
echo "Didn't run due to conditional filtering"
fe-tests-timezones:
runs-on: ubuntu-20.04
timeout-minutes: 14
steps:
- run: |
echo "Didn't run due to conditional filtering"
fe-chromatic:
runs-on: ubuntu-20.04
steps:
- run: |
echo "Didn't run due to conditional filtering"
......@@ -5,37 +5,28 @@ on:
branches:
- 'master'
- 'release-**'
paths-ignore:
# documentation
- "docs/**"
- "**.md"
# backend
- "enterprise/backend/**"
- "src/**"
- "test/**"
- "*modules/**" # modules/, test_modules/
# E2E
- "**.cy.*.js" # .cy.spec.js, .cy.snap.js
- "frontend/test/__support__/e2e/**"
- "frontend/test/__runner__/*cypress*"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
# documentation
- "docs/**"
- "**.md"
# backend
- "enterprise/backend/**"
- "src/**"
- "test/**"
- "*modules/**" # modules/, test_modules/
# E2E
- "**.cy.*.js" # .cy.spec.js, .cy.snap.js
- "frontend/test/__support__/e2e/**"
- "frontend/test/__runner__/*cypress*"
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-20.04
timeout-minutes: 3
outputs:
frontend_all: ${{ steps.changes.outputs.frontend_all }}
steps:
- uses: actions/checkout@v3
- name: Test which files changed
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
fe-linter-prettier:
needs: files-changed
if: needs.files-changed.outputs.frontend_all == 'true'
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
......@@ -46,6 +37,8 @@ jobs:
name: Run Prettier formatting linter
fe-linter-eslint:
needs: files-changed
if: needs.files-changed.outputs.frontend_all == 'true'
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
......@@ -60,6 +53,8 @@ jobs:
name: Run ESLint linter
fe-type-check:
needs: files-changed
if: needs.files-changed.outputs.frontend_all == 'true'
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
......@@ -76,7 +71,8 @@ jobs:
name: Check types
fe-tests-unit:
if: github.event.pull_request.draft == false
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.frontend_all == 'true'
runs-on: buildjet-2vcpu-ubuntu-2004
timeout-minutes: 20
steps:
......@@ -96,7 +92,8 @@ jobs:
flags: front-end
fe-tests-timezones:
if: github.event.pull_request.draft == false
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.frontend_all == 'true'
runs-on: ubuntu-20.04
timeout-minutes: 14
steps:
......@@ -111,7 +108,8 @@ jobs:
name: Run frontend timezones tests
fe-chromatic:
if: github.event.pull_request.draft == false
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.frontend_all == 'true'
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
......
# Required checks with path filtering rules will block pull requests from merging if they change only the excluded files.
# This is a workaround to allow the PR to be merged.
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Kerberized Presto Integration Test
on:
pull_request:
paths-ignore:
- '**/presto_jdbc/**'
- '**/presto_jdbc.clj'
push:
branches:
- 'feature**'
paths-ignore:
- '**/presto_jdbc/**'
- '**/presto_jdbc.clj'
jobs:
run-presto-kerberos-test:
runs-on: ubuntu-latest
steps:
- run: |
echo "Didn't run due to conditional filtering"
......@@ -2,9 +2,6 @@ name: Kerberized Presto Integration Test
on:
pull_request:
paths:
- '**/presto_jdbc/**'
- '**/presto_jdbc.clj'
push:
branches:
- master
......@@ -12,12 +9,26 @@ on:
- 'feature**'
tags:
- '**'
paths:
- '**/presto_jdbc/**'
- '**/presto_jdbc.clj'
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-20.04
timeout-minutes: 3
outputs:
backend_presto_kerberos: ${{ steps.changes.outputs.backend_presto_kerberos }}
steps:
- uses: actions/checkout@v3
- name: Test which files changed
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
run-presto-kerberos-test:
needs: files-changed
if: needs.files-changed.outputs.backend_presto_kerberos == 'true'
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
......
# Required checks with path filtering rules will block pull requests from merging if they change only the excluded files.
# This is a workaround to allow the PR to be merged.
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Snowplow
on:
pull_request:
branches:
- "**"
paths-ignore:
- "snowplow/**"
- ".github/workflows/**"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- run: |
echo "Didn't run due to conditional filtering"
......@@ -4,12 +4,26 @@ on:
pull_request:
branches:
- '**'
paths:
- 'snowplow/**'
- '.github/workflows/**'
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-20.04
timeout-minutes: 3
outputs:
snowplow: ${{ steps.changes.outputs.snowplow }}
steps:
- uses: actions/checkout@v3
- name: Test which files changed
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
lint:
needs: files-changed
if: needs.files-changed.outputs.snowplow == 'true'
runs-on: ubuntu-20.04
steps:
- name: Checkout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment