1+ name : 01 | ai-data-preprocessing-queue | continuous integration
2+ run-name : State ${{ github.ref }}
3+ on :
4+ push :
5+ branches :
6+ - " **"
7+ paths-ignore :
8+ - README.md
9+ - LICENSE.txt
10+ - .gitignore
11+ - .vscode/**
12+ - .devcontainer/**
13+
14+ jobs :
15+ changes :
16+ name : changes
17+ runs-on : ubuntu-latest
18+ timeout-minutes : 1
19+ outputs :
20+ ai_data_preprocessingqueue : ${{ steps.filter.outputs.ai_data_preprocessing_queue }}
21+ first_run : ${{ steps.first_run.outputs.first_run }}
22+ steps :
23+ - uses : actions/checkout@v4
24+ - uses : SamhammerAG/first-build-action@v2.1
25+ id : first_run
26+ with :
27+ workflow : 01 | ai-data-preprocessing-queue | continuous integration
28+ branch : ${{ github.ref_name }}
29+ - uses : dorny/paths-filter@v3
30+ id : filter
31+ with :
32+ base : ${{ github.ref }}
33+ filters : |
34+ ai-data-preprocessing-queue:
35+ - '.github/workflows/01-ci.yml'
36+ - 'ai-data-preprocessing-queue/**'
37+
38+ build_python :
39+ name : Python | build
40+ runs-on : ubuntu-latest
41+ timeout-minutes : 5
42+ steps :
43+ - uses : actions/checkout@v4
44+ - uses : actions/setup-python@v5
45+ with :
46+ python-version : 3.12
47+ - name : preparation | Add linting matchers
48+ run : |
49+ echo "::add-matcher::.github/mypy-error-problem-matcher.json"
50+ - name : preparation | upgrade pip
51+ if : needs.changes.outputs.ai_data_preprocessing_queue == 'true' || needs.changes.outputs.first_run == 'true'
52+ run : python -m pip install --upgrade pip
53+ - name : ai-data-preprocessing-queue | Install dependencies
54+ if : needs.changes.outputs.ai_data_preprocessing_queue == 'true' || needs.changes.outputs.first_run == 'true'
55+ run : pip install -r requirements-dev.txt
56+ - name : preparation | Create failures dir
57+ run : mkdir -p ./ruff_failures
58+ - name : ai-data-preprocessing-queue | ruff check
59+ if : needs.changes.outputs.ai_data_preprocessing_queue == 'true' || needs.changes.outputs.first_run == 'true'
60+ run : |
61+ ruff check --output-format github . || echo "ai_data_preprocessing_queue" >> ./ruff_failures/ruff_failures.txt
62+ - name : ai-data-preprocessing-queue | Lint typing
63+ if : needs.changes.outputs.ai_data_preprocessing_queue == 'true' || needs.changes.outputs.first_run == 'true'
64+ # Must run with installed dependencies
65+ # Must be executed from root with path to project as param because
66+ # the problem matcher needs an absolute path in error message to work correctly
67+ working-directory : ./
68+ run : |
69+ mypy --config-file .mypy.ini --show-column-numbers ai-data-preprocessing-queue
70+ - name : Test ai-data-preprocessing-queue
71+ if : needs.changes.outputs.ai_data_preprocessing_queue == 'true' || needs.changes.outputs.first_run == 'true'
72+ working-directory : ai-data-preprocessing-queue
73+ run : pytest --cov app --cov-report=xml tests
74+ - name : ai-data-preprocessing-queue | Report coverage
75+ if : needs.changes.outputs.ai_data_preprocessing_queue == 'true' || needs.changes.outputs.first_run == 'true'
76+ uses : MishaKav/pytest-coverage-comment@main
77+ with :
78+ title : Test coverage for changes on ai-data-preprocessing-queue
79+ pytest-xml-coverage-path : ai-data-preprocessing-queue/coverage.xml
80+ report-only-changed-files : true
0 commit comments