Skip to content

Commit e41e784

Browse files
author
Gennadii Kandaurov
committed
add pipeline
1 parent fa27d81 commit e41e784

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

.coveragerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[report]
2+
exclude_also =
3+
logger\.info\(.*\)
4+
if __name__ == .__main__.:
5+
fail_under = 90
6+
precision = 2
7+
show_missing = true

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 80
3+
extend-ignore = F403, F405, F401

.github/workflows/validation.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Validation
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
validate_homeworks:
13+
name: Validate all homeworks
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5.2.0
19+
with:
20+
python-version: '3.12'
21+
cache: 'pip'
22+
23+
- name: Install dependencies
24+
run: pip install -r requirements.txt
25+
26+
- name: Build C-ext
27+
working-directory: ./lesson-12/src/capi_utils
28+
run: python setup.py install
29+
30+
- name: Check flake8
31+
run: flake8 .
32+
33+
- name: Check pylint
34+
if: ${{ always() }}
35+
run: pylint ./*/*.py
36+
37+
- name: Check tests with pytest
38+
if: ${{ always() }}
39+
run: coverage run -m pytest .
40+
41+
- name: Check test coverage
42+
run: coverage report -m

.pylintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[MASTER]
2+
disable=
3+
C0114, # missing-module-docstring
4+
C0115,
5+
C0116,
6+
7+
[FORMAT]
8+
max-line-length=80

requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
setuptools==75.6.0
2+
aiohttp==3.10.5
3+
4+
flake8==7.1.0
5+
pylint==3.2.7
6+
pytest==8.3.2
7+
coverage==7.6.1

0 commit comments

Comments
 (0)