mirror of https://github.com/jumpserver/jumpserver
Bai
2 months ago
committed by
老广
1 changed files with 49 additions and 0 deletions
@ -0,0 +1,49 @@ |
|||||||
|
name: Check I18n files CompileMessages |
||||||
|
|
||||||
|
on: |
||||||
|
pull_request: |
||||||
|
branches: |
||||||
|
- 'dev' |
||||||
|
paths: |
||||||
|
- 'apps/i18n/core/**/*.po' |
||||||
|
types: |
||||||
|
- opened |
||||||
|
- synchronize |
||||||
|
- reopened |
||||||
|
jobs: |
||||||
|
compile-messages-check: |
||||||
|
runs-on: ubuntu-latest |
||||||
|
|
||||||
|
steps: |
||||||
|
- name: Checkout repository |
||||||
|
uses: actions/checkout@v4 |
||||||
|
|
||||||
|
- name: Set up Python |
||||||
|
uses: actions/setup-python@v4 |
||||||
|
with: |
||||||
|
python-version: '3.11' |
||||||
|
|
||||||
|
- name: Install system dependencies |
||||||
|
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev python3-dev libldap2-dev libssl-dev gettext |
||||||
|
|
||||||
|
- name: Install Poetry |
||||||
|
run: | |
||||||
|
curl -sSL https://install.python-poetry.org | python3 - |
||||||
|
echo "export PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV |
||||||
|
|
||||||
|
- name: Install dependencies |
||||||
|
run: | |
||||||
|
poetry install |
||||||
|
echo "VENV_PATH=$(poetry env info --path)" >> $GITHUB_ENV |
||||||
|
|
||||||
|
- name: Set up environment |
||||||
|
run: | |
||||||
|
cp config_example.yml config.yml |
||||||
|
sed -i 's/SECRET_KEY:.*/SECRET_KEY: ABC/' config.yml |
||||||
|
sed -i 's/BOOTSTRAP_TOKEN:.*/BOOTSTRAP_TOKEN: ABC/' config.yml |
||||||
|
|
||||||
|
- name: Run compilemessages |
||||||
|
run: | |
||||||
|
source $VENV_PATH/bin/activate |
||||||
|
cd apps |
||||||
|
python manage.py compilemessages |
Loading…
Reference in new issue