2020-05-14 18:26:12 -04:00
|
|
|
name: Translations
|
|
|
|
|
2021-01-07 03:47:00 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- "dependabot/npm_and_yarn/**"
|
|
|
|
pull_request:
|
2021-01-21 19:10:17 -05:00
|
|
|
types: [synchronize, opened, reopened, ready_for_review]
|
2020-05-14 18:26:12 -04:00
|
|
|
|
|
|
|
jobs:
|
2020-09-10 16:12:00 -04:00
|
|
|
frontend-check:
|
2021-01-21 19:10:17 -05:00
|
|
|
if: github.event.pull_request.draft == false
|
2021-01-15 19:14:33 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-05-14 18:26:12 -04:00
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2020-12-08 18:27:08 -05:00
|
|
|
uses: actions/checkout@v2
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Install dependencies
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
|
|
|
run: npm-install
|
|
|
|
- name: lint
|
|
|
|
working-directory: ./superset-frontend
|
|
|
|
run: |
|
|
|
|
npm run check-translation
|
2020-09-10 16:12:00 -04:00
|
|
|
|
|
|
|
babel-extract:
|
2021-01-21 19:10:17 -05:00
|
|
|
if: github.event.pull_request.draft == false
|
2021-01-15 19:14:33 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-09-10 16:12:00 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [3.7]
|
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2020-09-10 16:12:00 -04:00
|
|
|
uses: actions/checkout@v2
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
2020-09-10 16:12:00 -04:00
|
|
|
- name: Setup Python
|
2020-11-11 16:15:05 -05:00
|
|
|
uses: actions/setup-python@v2
|
2020-09-10 16:12:00 -04:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-09-10 16:12:00 -04:00
|
|
|
with:
|
|
|
|
run: |
|
|
|
|
apt-get-install
|
|
|
|
pip-upgrade
|
2020-09-12 01:59:12 -04:00
|
|
|
pip install -r requirements/base.txt
|
2020-09-10 16:12:00 -04:00
|
|
|
- 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
|