File tree Expand file tree Collapse file tree 4 files changed +46
-5
lines changed Expand file tree Collapse file tree 4 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 1+ name : my check
2+
3+ on :
4+ - push
5+ - pull_request
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - name : Set up Python
13+ uses : actions/setup-python@v5
14+ with :
15+ python-version : ' 3.12'
16+ # make depends on uv
17+ - name : Install dependencies
18+ run : |
19+ pip install uv
20+ make install
21+ - name : Run linter and pytest
22+ run : |
23+ make check
24+ - name : Test & publish code coverage
25+ 26+ if : github.ref_name == 'main'
27+ env :
28+ CC_TEST_REPORTER_ID : ${{ secrets.CC_TEST_REPORTER_ID }}
29+ with :
30+ coverageCommand : make test-coverage
31+ debug : true
Original file line number Diff line number Diff line change @@ -7,5 +7,13 @@ install:
77build :
88 uv build
99
10+ test-coverage :
11+ uv run pytest --cov=gendiff --cov-report xml
12+
1013package-install :
1114 uv tool dist/* .whl
15+
16+ test :
17+ uv run pytest
18+
19+ check : test lint
Original file line number Diff line number Diff line change 11### Hexlet tests and linter status:
2- [ ![ Actions Status] ( https://github.com/ttehasi/python-project-50/actions/workflows/hexlet-check.yml/badge.svg )] ( https://github.com/ttehasi/python-project-50/actions )
2+ [ ![ Actions Status] ( https://github.com/ttehasi/python-project-50/actions/workflows/hexlet-check.yml/badge.svg )] ( https://github.com/ttehasi/python-project-50/actions )
3+
4+ <a href =" https://codeclimate.com/github/ttehasi/python-project-50/maintainability " ><img src =" https://api.codeclimate.com/v1/badges/88675eaf4e4ca1e04a88/maintainability " /></a >
5+
6+ <a href =" https://codeclimate.com/github/ttehasi/python-project-50/test_coverage " ><img src =" https://api.codeclimate.com/v1/badges/88675eaf4e4ca1e04a88/test_coverage " /></a >
Original file line number Diff line number Diff line change @@ -7,10 +7,8 @@ def open_f(path_to_file) -> dict:
77
88
99def generate_diff (file1 , file2 ):
10- file1 = open_f (file1 )
11- file2 = open_f (file2 )
12- sorted_keys_f1 = sorted (list (file1 ))
13- sorted_keys_f2 = sorted (list (file2 ))
10+ sorted_keys_f1 = sorted (list (open_f (file1 )))
11+ sorted_keys_f2 = sorted (list (open_f (file2 )))
1412 res = '''{
1513'''
1614 for i in sorted_keys_f1 :
You can’t perform that action at this time.
0 commit comments