Skip to content

Commit

Permalink
Merge pull request #2502 from Exirel/ci-make-lint-mandatory
Browse files Browse the repository at this point in the history
ci, make: "lint" (flake8 & mypy) replace "quality"
  • Loading branch information
dgw authored Aug 16, 2023
2 parents 7b74964 + 6fa76f3 commit bc688b4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
### Description

What does this do? What problem does it solve? Does it resolve any GitHub issues?

### Checklist

- [ ] I have read [CONTRIBUTING.md](https://github.com/sopel-irc/sopel/blob/master/CONTRIBUTING.md)
- [ ] I can and do license this contribution under the EFLv2
- [ ] No issues are reported by `make qa` (runs `make quality` and `make test`)
- [ ] No issues are reported by `make qa` (runs `make lint` and `make test`)
- [ ] I have tested the functionality of the things this change touches
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
python -m pip install --upgrade wheel
python -m pip install --upgrade -r dev-requirements.txt
python -m pip install -e .
- name: Check code style
run: make quality
- name: Run linters (code style and type check)
run: make lint
- name: Run pytest
run: make test_norecord
- name: Upload coverage data to coveralls.io
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.PHONY: qa
qa: quality test coverages
qa: lint test coverages

.PHONY: quality mypy
quality:
.PHONY: lint lint-style lint-type
lint: lint-style lint-type

lint-style:
flake8

mypy:
lint-type:
mypy --check-untyped-defs sopel

.PHONY: test test_norecord test_novcr vcr_rerecord
Expand Down
6 changes: 2 additions & 4 deletions contrib/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ envlist =
skip_missing_interpreters = true
ignore_base_python_conflict = true
labels =
mypy = py{37,38,39,310,311}-mypy
quality = py{37,38,39,310,311}-quality
lint = py{37,38,39,310,311}-lint
test = py{37,38,39,310,311}-test


Expand Down Expand Up @@ -39,8 +38,7 @@ setenv =

commands =
qa: make -C.. qa
mypy: make -C.. mypy
quality: make -C.. quality
lint: make -C.. lint
test: make -C.. test
# NOTE:there's currently no way to specify separate output directories for
# the HTML coverage report, but the CLI report is probably fine anyway
Expand Down

0 comments on commit bc688b4

Please sign in to comment.