mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
3a34c7ff7c
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
# Python Misc unit tests
|
|
name: Python Misc
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "master"
|
|
- "[0-9].[0-9]"
|
|
paths:
|
|
- "superset/**"
|
|
pull_request:
|
|
types: [synchronize, opened, reopened, ready_for_review]
|
|
paths:
|
|
- "superset/**"
|
|
|
|
# cancel previous workflow jobs for PRs
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
python-lint:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
steps:
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
submodules: recursive
|
|
- name: Check if python changes are present
|
|
id: check
|
|
env:
|
|
GITHUB_REPO: ${{ github.repository }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
continue-on-error: true
|
|
run: ./scripts/ci_check_no_file_changes.sh python
|
|
- name: Setup Python
|
|
uses: ./.github/actions/setup-backend/
|
|
if: steps.check.outcome == 'failure'
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: pylint
|
|
if: steps.check.outcome == 'failure'
|
|
# `-j 0` run Pylint in parallel
|
|
run: pylint -j 0 superset
|
|
|
|
babel-extract:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
steps:
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
submodules: recursive
|
|
- name: Setup Python
|
|
uses: ./.github/actions/setup-backend/
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Test babel extraction
|
|
run: flask fab babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _,__,t,tn,tct
|