Compile Card DB #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile Card DB | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
compile_card_db: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- run: | | |
pip install -r requirements.txt | |
pip install . | |
- name: Update Languages | |
run: doit update_languages | |
- run: | | |
pip install . | |
- name: Install locales | |
if: ${{ matrix.os == 'ubuntu-latest'}} | |
run: | | |
sudo apt update | |
sudo apt -y install locales | |
sudo locale-gen en_US.UTF-8 | |
sudo locale-gen de_DE.UTF-8 | |
sudo locale-gen fr_FR.UTF-8 | |
sudo locale-gen en_US.UTF-8 | |
sudo locale-gen es_ES.UTF-8 | |
sudo locale-gen it_IT.UTF-8 | |
sudo locale-gen nl_NL.UTF-8 | |
sudo locale-gen cs_CZ.UTF-8 | |
- name: test generation with compiled Languages | |
run: pytest -k "test_languages" | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
base: HEAD | |
filters: | | |
cardb_target: | |
- src/domdiv/card_db/** | |
- name: Create Artifact | |
uses: actions/upload-artifact@v3 | |
if: steps.filter.outputs.cardb_target == 'true' | |
with: | |
name: card_db | |
path: src/domdiv/card_db/ | |
- name: Save PR number | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
mkdir -p ./pr | |
echo $PR_NUMBER > ./pr/pr_number | |
- name: Upload PR Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pr_number | |
path: pr/ |