2020-05-14 18:26:12 -04:00
|
|
|
name: Translations
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2020-09-10 16:12:00 -04:00
|
|
|
frontend-check:
|
2020-05-14 18:26:12 -04:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Cancel Previous Runs
|
|
|
|
uses: styfle/cancel-workflow-action@0.6.0
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
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:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [3.7]
|
|
|
|
steps:
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Cancel Previous Runs
|
|
|
|
uses: styfle/cancel-workflow-action@0.6.0
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
2020-09-10 16:12:00 -04:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- 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
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
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
|