-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Добавление линтеров в воркфлоу (#10)
Добавлены актуальные версии линтеров в pre-commit. Добавлена проверка в workflow. Добавлены исключения в setup.cfg
- Loading branch information
Showing
3 changed files
with
45 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,45 @@ | ||
name: Upload coverage reports to Codecov | ||
name: Main workflow | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
branches: | ||
- dev | ||
- main | ||
|
||
jobs: | ||
build: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run tests with coverage | ||
run: | | ||
pip install coverage | ||
coverage run -m unittest discover | ||
coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: CRM-for-Yandex-ambassadors/backend | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8==6.1.0 flake8-isort==6.0.0 black==24.2.0 | ||
- name: Check with flake8 | ||
run: python -m flake8 backend/crm_yandex/ | ||
|
||
- name: Check with black | ||
run: black --check backend/crm_yandex/ | ||
|
||
- name: Run tests with coverage | ||
run: | | ||
pip install coverage | ||
coverage run -m unittest discover | ||
coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: CRM-for-Yandex-ambassadors/backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters