Skip to content

Commit d084cb7

Browse files
committed
KIT-4745 adjusted workflow actions
1 parent 7e393c6 commit d084cb7

File tree

4 files changed

+82
-50
lines changed

4 files changed

+82
-50
lines changed

.github/workflows/01-ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
name: Build and/or publish Python 🐍 distributions 📦 to PyPI
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-python@v4
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
1313
with:
1414
python-version: "3.12"
1515
- run: >-

.github/workflows/ci.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
".idea": true,
1515
".mypy_cache": true,
1616
".mypy.ini": true,
17-
".pylintrc": true,
1817
"*.egg-info": true,
1918
"**/__pycache__": true,
2019
"**/.pytest_cache": true,

0 commit comments

Comments
 (0)