2020-11-24 14:40:16 -05:00
|
|
|
# Python Misc unit tests
|
|
|
|
name: Python Misc
|
|
|
|
|
2021-01-07 03:47:00 -05:00
|
|
|
on:
|
|
|
|
push:
|
2024-01-23 23:30:53 -05:00
|
|
|
branches:
|
2024-03-06 12:23:07 -05:00
|
|
|
- "master"
|
|
|
|
- "[0-9].[0-9]"
|
2024-01-23 23:30:53 -05:00
|
|
|
paths:
|
|
|
|
- "superset/**"
|
2021-01-07 03:47:00 -05:00
|
|
|
pull_request:
|
2021-01-21 19:10:17 -05:00
|
|
|
types: [synchronize, opened, reopened, ready_for_review]
|
2024-01-23 23:30:53 -05:00
|
|
|
paths:
|
|
|
|
- "superset/**"
|
2020-11-24 14:40:16 -05:00
|
|
|
|
2024-02-01 10:08:41 -05:00
|
|
|
# cancel previous workflow jobs for PRs
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-11-24 14:40:16 -05:00
|
|
|
jobs:
|
2021-02-05 15:54:37 -05:00
|
|
|
python-lint:
|
2021-01-15 19:14:33 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-11-24 14:40:16 -05:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-10 13:21:56 -04:00
|
|
|
python-version: ["3.9"]
|
2020-11-24 14:40:16 -05:00
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2024-02-01 13:56:33 -05:00
|
|
|
uses: actions/checkout@v4
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
2021-02-05 10:40:08 -05:00
|
|
|
- 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
|
2020-11-24 14:40:16 -05:00
|
|
|
- name: Setup Python
|
2024-03-18 21:39:41 -04:00
|
|
|
uses: ./.github/actions/setup-backend/
|
2021-10-08 02:13:01 -04:00
|
|
|
if: steps.check.outcome == 'failure'
|
2020-11-24 14:40:16 -05:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: pylint
|
2021-02-05 10:40:08 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2020-11-24 14:40:16 -05:00
|
|
|
# `-j 0` run Pylint in parallel
|
|
|
|
run: pylint -j 0 superset
|
|
|
|
|
|
|
|
babel-extract:
|
2021-01-15 19:14:33 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-11-24 14:40:16 -05:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-10 13:21:56 -04:00
|
|
|
python-version: ["3.9"]
|
2020-11-24 14:40:16 -05:00
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2024-02-01 13:56:33 -05:00
|
|
|
uses: actions/checkout@v4
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
2020-11-24 14:40:16 -05:00
|
|
|
- name: Setup Python
|
2024-03-18 21:39:41 -04:00
|
|
|
uses: ./.github/actions/setup-backend/
|
2020-11-24 14:40:16 -05:00
|
|
|
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
|