Skip to content

Commit 63d0f15

Browse files
authored
Rename tox envs by task not technology (#107)
2 parents e18b238 + ee5a4e9 commit 63d0f15

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
pip-install: ".[dev]"
5252

5353
- name: Run tests
54-
run: tox -e pytest
54+
run: tox -e tests
5555

5656
- name: Upload coverage to Codecov
5757
uses: codecov/codecov-action@v4

docs/how-to/coverage.md

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

22
# How to check code coverage
33

4-
Code coverage is reported to the command line and to a `cov.xml` file by the command `tox -e pytest`. The file is uploaded to the Codecov service in CI.
4+
Code coverage is reported to the command line and to a `cov.xml` file by the command `tox -e tests`. The file is uploaded to the Codecov service in CI.
55

66
## Adding a Codecov Token
77

docs/how-to/run-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $ pytest
1111
When you have some fully working tests then you can run it with coverage:
1212

1313
```
14-
$ tox -e pytest-cov
14+
$ tox -e tests
1515
```
1616

1717
It will also report coverage to the commandline and to `cov.xml`.

docs/how-to/static-analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
Static type analysis is done with [pyright](https://microsoft.github.io/pyright/). It checks type definition in source files without running them, and highlights potential issues where types do not match. You can run it with:
44

55
```
6-
$ tox -e pyright
6+
$ tox -e type-checking
77
```

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ legacy_tox_ini = """
3838
[tox]
3939
skipsdist=True
4040
41-
[testenv:{pre-commit,pytest,docs}]
41+
[testenv:{pre-commit,tests,docs}]
4242
# Don't create a virtualenv for the command, requires tox-direct plugin
4343
direct = True
4444
passenv = *
@@ -49,7 +49,7 @@ allowlist_externals =
4949
sphinx-autobuild
5050
commands =
5151
pre-commit: pre-commit run --all-files --show-diff-on-failure {posargs}
52-
pytest: pytest {posargs}
52+
tests: pytest {posargs}
5353
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
5454
"""
5555

template/pyproject.toml.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ legacy_tox_ini = """
7979
[tox]
8080
skipsdist=True
8181

82-
[testenv:{pre-commit,pyright,pytest{% if sphinx %},docs{% endif %}}]
82+
[testenv:{pre-commit,type-checking,tests{% if sphinx %},docs{% endif %}}]
8383
# Don't create a virtualenv for the command, requires tox-direct plugin
8484
direct = True
8585
passenv = *
@@ -90,9 +90,9 @@ allowlist_externals =
9090
{% if sphinx %} sphinx-build
9191
sphinx-autobuild
9292
{% endif %}commands =
93-
pytest: pytest --cov={{ package_name }} --cov-report term --cov-report xml:cov.xml {posargs}
94-
pyright: pyright src tests {posargs}
9593
pre-commit: pre-commit run --all-files {posargs}
94+
type-checking: pyright src tests {posargs}
95+
tests: pytest --cov={{ package_name }} --cov-report term --cov-report xml:cov.xml {posargs}
9696
{% if sphinx %} docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
9797
{% endif %}"""
9898

template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/ci.yml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: needs.check.outputs.branch-pr == ''
1414
uses: ./.github/workflows/_tox.yml
1515
with:
16-
tox: pre-commit,pyright
16+
tox: pre-commit,type-checking
1717
{% raw %}
1818
test:
1919
needs: check

0 commit comments

Comments
 (0)