Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 9faed42

Browse files
authored
Merge pull request #620 from iKostanOrg/master
Merge from master
2 parents 92981fe + 04bcd7a commit 9faed42

File tree

12,133 files changed

+49896
-15580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,133 files changed

+49896
-15580
lines changed

.codacy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
reviews:
3+
high_level_summary: true
24
engines:
35
duplication:
46
enabled: true
@@ -19,16 +21,18 @@ languages:
1921
extensions:
2022
- '.md'
2123
exclude_paths:
24+
- '.venv/**'
25+
- 'allure-report/**'
26+
- 'allure-results/**'
27+
- 'deprecated/**'
2228
- 'docs/**'
2329
- 'allure-report/**'
2430
- 'img/**'
2531
- '.circleci/**'
2632
- '.circleci/**'
2733
- '.github/**'
28-
- '*__init__.py'
29-
- 'rocro.yml'
34+
- '**__init__.py'
3035
- 'requirements.txt'
3136
- 'pytest.ini'
32-
- '.travis.yml'
3337
- '.gitignore'
3438
- '.gitattributes'

.codeclimate.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
11
---
2-
engines:
3-
# ... CONFIG CONTENT ...
4-
pylint:
5-
enabled: true
6-
# ... CONFIG CONTENT ...
7-
checks:
8-
import-error:
9-
enabled: false
10-
# ... CONFIG CONTENT ...
2+
version: "2" # required to adjust maintainability checks
3+
4+
checks:
5+
import-error:
6+
enabled: false
7+
syntax-error:
8+
enabled: false
9+
no-name-in-module:
10+
enabled: false
11+
similar-code:
12+
config:
13+
threshold: 68
14+
identical-code:
15+
config:
16+
threshold: 32
17+
plugins:
18+
duplication:
19+
enabled: false
20+
exclude_patterns:
21+
- ".circleci/"
22+
- ".github/"
23+
- ".venv/"
24+
- "docs/"
25+
- "deprecated/"
26+
- "img/"
27+
- "**/node_modules/"
28+
- "script/"
29+
- "**/spec/"
30+
- "**/vendor/"
31+
- "**/*_test.go"
32+
- "**/*.d.ts"
33+
- "allure-report/"
34+
- "allure-results/"
35+
- "*.txt"

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# include = */src/*
33
# omit anything in a virtualenv directory anywhere
44
omit =
5+
deprecated/*
56
/home/travis/virtualenv/*
67
*.yml
78
/home/travis/img/*
@@ -13,6 +14,11 @@ omit =
1314
*.html
1415
/tests/*
1516
test_*
17+
allure-report/*
18+
allure-results/*
19+
.circleci/*
20+
.github/*
21+
img/*
1622

1723
[report]
1824
; Regexes for lines to exclude from consideration
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Codacy Coverage Reporter
3+
4+
# Source:
5+
# https://github.com/codacy/codacy-coverage-reporter-action
6+
on: # yamllint disable-line rule:truthy
7+
push:
8+
branches:
9+
- 'master'
10+
workflow_call:
11+
12+
jobs:
13+
codacy-coverage-reporter:
14+
runs-on: 'ubuntu-24.04'
15+
name: codacy-coverage-reporter
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Setup Python
19+
uses: actions/setup-python@main
20+
with:
21+
python-version: "3.12"
22+
check-latest: true
23+
- name: Check Python version
24+
run: python --version
25+
- name: Install prerequisites
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install --upgrade setuptools
29+
python -m pip install --upgrade wheel
30+
pip install --no-cache-dir -r requirements.txt --upgrade
31+
- name: Install pytest, pytest-cov
32+
run: |
33+
pip install pytest
34+
pip install pytest-cov
35+
- name: Generate coverage report
36+
# You must now upload using a token.
37+
# https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
38+
# yamllint disable rule:line-length
39+
run: |
40+
python -c "import os; print(os.getcwd())"
41+
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
42+
# yamllint enable rule:line-length
43+
- name: Run codacy-coverage-reporter
44+
run: |
45+
export CODACY_ORGANIZATION_PROVIDER=gh \
46+
export CODACY_USERNAME=iKostanOrg \
47+
export CODACY_PROJECT_NAME=codewars
48+
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
49+
--api-token ${{ secrets.CODACY_API_TOKEN }} \
50+
--language Python \
51+
--coverage-reports /home/runner/work/codewars/codewars/coverage.xml

.github/workflows/codeclimate_coverage.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Code Climate Coverage Report
33

44
on: # yamllint disable-line rule:truthy
55
pull_request_target:
6+
branches:
7+
- 'none'
68
types:
79
- opened
810
- edited
@@ -18,24 +20,27 @@ jobs:
1820
runs-on: ${{ matrix.os }}
1921
strategy:
2022
matrix:
21-
os: [ubuntu-latest]
23+
os: ['ubuntu-24.04']
2224
python-version: ["3.X"]
2325
steps:
2426
- uses: actions/checkout@main
2527
- name: Setup Python
2628
uses: actions/setup-python@main
2729
with:
28-
python-version: ${{ matrix.python-version }}
30+
python-version: "3.12"
31+
check-latest: true
32+
- name: Check Python version
33+
run: python --version
34+
- name: Check PYTHONPATH
35+
run: |
36+
pwd
37+
export PYTHONPATH=.:$PYTHONPATH
2938
- name: Install Dependencies
3039
run: |
3140
python -m pip install --upgrade pip setuptools
3241
python -m pip install pytest
3342
pip install -r requirements.txt
3443
pip install pytest-cov
35-
- name: Check PYTHONPATH
36-
run: |
37-
pwd
38-
export PYTHONPATH=.:$PYTHONPATH
3944
- name: Upload coverage to Code Climate
4045
uses: paambaati/[email protected]
4146
env:

.github/workflows/codecov.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Codecov Coverage Report
33

44
on: # yamllint disable-line rule:truthy
55
pull_request_target:
6+
branches:
7+
- 'none'
68
types:
79
- opened
810
- edited
@@ -19,14 +21,15 @@ jobs:
1921
runs-on: ${{ matrix.os }}
2022
strategy:
2123
matrix:
22-
os: [ubuntu-latest]
23-
python-version: ["3.12"]
24+
os: ['ubuntu-24.04']
2425
steps:
2526
- uses: actions/checkout@main
2627
- name: Setup Python
2728
uses: actions/setup-python@main
2829
with:
29-
python-version: ${{ matrix.python-version }}
30+
python-version: "3.12"
31+
check-latest: true
32+
- run: python --version
3033
- name: Install prerequisites
3134
run: |
3235
python -m pip install --upgrade pip setuptools wheel
@@ -36,15 +39,15 @@ jobs:
3639
pip install pytest
3740
pip install pytest-cov
3841
- name: Generate coverage report
42+
# You must now upload using a token.
43+
# https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
3944
# yamllint disable rule:line-length
4045
run: |
4146
python -c "import os; print(os.getcwd())"
42-
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
47+
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./ --junitxml=junit.xml -o junit_family=legacy --debug
4348
# yamllint enable rule:line-length
44-
- name: Upload coverage to Codecov
45-
uses: codecov/[email protected]
49+
- name: Upload test results to Codecov
50+
if: ${{ !cancelled() }}
51+
uses: codecov/test-results-action@v1
4652
with:
4753
token: ${{ secrets.codecov_token }}
48-
files: coverage.xml
49-
fail_ci_if_error: true # optional (default = false)
50-
verbose: true # optional (default = false)

.github/workflows/codeql.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
name: "CodeQL"
1616

1717
on: # yamllint disable-line rule:truthy
18-
pull_request_target:
19-
types:
20-
- opened
21-
- edited
22-
- synchronize
23-
- reopened
18+
push:
19+
branches-ignore:
20+
- master
2421
workflow_call:
2522

2623
jobs:
@@ -31,7 +28,7 @@ jobs:
3128
# - https://gh.io/supported-runners-and-hardware-resources
3229
# - https://gh.io/using-larger-runners (GitHub.com only)
3330
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
34-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-24.04' }}
3532
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
3633
permissions:
3734
# required for all workflows

.github/workflows/flake8.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ name: Flake8
33

44
on: # yamllint disable-line rule:truthy
55
push:
6-
branches:
7-
- 'utils'
8-
- 'none'
6+
branches-ignore:
7+
- master
98
workflow_call:
109

1110
permissions:
@@ -14,7 +13,10 @@ permissions:
1413

1514
jobs:
1615
build:
17-
runs-on: ubuntu-latest
16+
runs-on: 'ubuntu-24.04'
17+
# Adding 'timeout-minutes: 10' would prevent jobs from running
18+
# indefinitely if something goes wrong
19+
timeout-minutes: 10
1820
strategy:
1921
matrix:
2022
python-version: ["3.x"]

.github/workflows/flake8_kyu2.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ permissions:
1212

1313
jobs:
1414
build:
15-
runs-on: ubuntu-latest
15+
runs-on: 'ubuntu-24.04'
16+
timeout-minutes: 10
1617
strategy:
1718
matrix:
1819
python-version: ["3.x"]
@@ -33,9 +34,6 @@ jobs:
3334
python -m pip install --upgrade pip setuptools wheel
3435
pip install -r requirements.txt
3536
pip install flake8
36-
- name: Check to make sure that the module is in your Python path
37-
run: |
38-
echo $PYTHONPATH
3937
- name: Lint with flake8
4038
# yamllint disable rule:line-length
4139
# stop the build if there are Python syntax errors or undefined names

.github/workflows/flake8_kyu3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
build:
15-
runs-on: ubuntu-latest
15+
runs-on: 'ubuntu-24.04'
1616
strategy:
1717
matrix:
1818
python-version: ["3.x"]

0 commit comments

Comments
 (0)