mirror of
https://github.com/apache/superset.git
synced 2026-04-07 10:31:50 +00:00
feat(ci): only run precommit on changed files (#38155)
Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
10
.github/workflows/pre-commit.yml
vendored
10
.github/workflows/pre-commit.yml
vendored
@@ -64,11 +64,17 @@ jobs:
|
||||
restore-keys: |
|
||||
pre-commit-v2-${{ runner.os }}-py${{ matrix.python-version }}-
|
||||
|
||||
- name: Get changed files
|
||||
id: changed_files
|
||||
uses: ./.github/actions/file-changes-action
|
||||
with:
|
||||
output: ' '
|
||||
|
||||
- name: pre-commit
|
||||
run: |
|
||||
set +e # Don't exit immediately on failure
|
||||
export SKIP=eslint-frontend,type-checking-frontend
|
||||
pre-commit run --all-files
|
||||
export SKIP=type-checking-frontend
|
||||
pre-commit run --files ${{ steps.changed_files.outputs.files }}
|
||||
PRE_COMMIT_EXIT_CODE=$?
|
||||
git diff --quiet --exit-code
|
||||
GIT_DIFF_EXIT_CODE=$?
|
||||
|
||||
@@ -237,8 +237,7 @@
|
||||
"jsx-a11y/no-noninteractive-tabindex": "error",
|
||||
"jsx-a11y/no-redundant-roles": "error",
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
// TODO: Fix missing aria-selected on tab roles
|
||||
"jsx-a11y/role-has-required-aria-props": "warn",
|
||||
"jsx-a11y/role-has-required-aria-props": "error",
|
||||
"jsx-a11y/role-supports-aria-props": "error",
|
||||
"jsx-a11y/scope": "error",
|
||||
"jsx-a11y/tabindex-no-positive": "error",
|
||||
|
||||
@@ -168,6 +168,7 @@ const FilterTitleContainer = forwardRef<HTMLDivElement, Props>(
|
||||
key={`filter-title-tab-${id}`}
|
||||
onClick={() => onChange(id)}
|
||||
className={classNames.join(' ')}
|
||||
aria-selected={isActive}
|
||||
>
|
||||
<div css={{ display: 'flex', width: '100%', alignItems: 'center' }}>
|
||||
<div
|
||||
|
||||
@@ -141,6 +141,7 @@ const ItemTitleContainer = forwardRef<HTMLDivElement, Props>(
|
||||
key={`item-title-tab-${id}`}
|
||||
onClick={() => onChange(id)}
|
||||
className={classNames.join(' ')}
|
||||
aria-selected={isActive}
|
||||
>
|
||||
<div css={{ display: 'flex', width: '100%', alignItems: 'center' }}>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user