Rozšířit CI na partial, workflow_dispatch (#270) #259
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: partial | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
partial: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest', 'windows-latest'] | |
python-version: ['3.12', '3.8'] # na partial nam staci nejnovejsi a nejstarsi verze | |
module: ['datovky', 'dotinfo', 'eufondy', 'iissp', 'czechpoint', 'justice', 'psp', 'steno', 'smlouvy', 'szif', 'zakazky', 'volby', 'udhpsh', 'res', 'red', 'ruian', 'ares'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run partial processing | |
id: main | |
if: matrix.module != 'red' && matrix.module != 'zakazky' && matrix.module != 'eufondy' | |
run: | | |
python3 main.py --connstring sqlite:///data.db --partial ${{ matrix.module }} | |
- name: Run partial processing (broken jobs) | |
# par jobu jsme preskocili, ted je pustime znovu, ale ocekavame, ze spadnou | |
# exity nejsou na windows, takze poustime jen na ubuntu | |
if: steps.main.conclusion == 'skipped' && matrix.os != 'windows-latest' | |
run: | | |
python3 main.py --connstring sqlite:///data.db --partial ${{ matrix.module }} || exit 0 | |
exit 1 |