-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run check-manifest and other linters via GitHub Actions. #396
Changes from 5 commits
85f861a
bd4ce62
6c5b16c
6087488
d07f208
b983603
4d490f7
797967a
523b173
10cecdb
3721e33
1bb6221
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,47 +151,36 @@ jobs: | |
run: | | ||
codecov -n "GitHub Actions - ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}" | ||
|
||
check: | ||
name: ${{ matrix.task.name}} - ${{ matrix.python.name }} | ||
lint: | ||
name: Linters | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: | ||
# Using second most recent minor release for whatever little | ||
# increase in stability over using the latest minor. | ||
- name: CPython 3.9 | ||
tox: py39 | ||
action: 3.9 | ||
task: | ||
- name: Check Newsfragment | ||
tox: check-newsfragment | ||
env: | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download package files | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
- name: Set up ${{ matrix.python.name }} | ||
- name: Set up python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python.action }} | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: python -m pip install --upgrade pip tox | ||
|
||
- uses: twisted/python-info-action@v1 | ||
|
||
- name: Tox | ||
run: tox -c tox.ini -e ${{ matrix.task.tox }} | ||
run: tox -c tox.ini --parallel -e pre-commit | ||
|
||
- name: Tox | ||
run: tox -c tox.ini --parallel -e check-newsfragment | ||
|
||
- name: Tox | ||
run: tox -c tox.ini --parallel -e check-manifest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the relevant names for the step name. Why parallel for single environments? How about |
||
|
||
|
||
pypi-publish: | ||
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
# Allow for longer test strings. Code is formatted to 88 columns by Black. | ||
max-line-length = 99 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still in the boat of using the program's default config file. Even when using the 'single config file for everything' option you still end up with multiple single config files. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plan it to move more things from setup.py into setup.cfg ... I am using it in #398 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any project using black will still have to have a |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tox] | ||
envlist = cov-erase, pre-commit, {pypy37,pypy38,py37,py38,py39,py310}-tests, flake8, check-manifest, check-newsfragment, cov-report | ||
envlist = cov-erase, pre-commit, {pypy37,pypy38,py37,py38,py39,py310}-tests, check-manifest, check-newsfragment | ||
isolated_build=true | ||
skip_missing_envs = true | ||
|
||
|
@@ -33,37 +33,4 @@ commands = | |
# specifying the entry point script in `{envbindir}`. | ||
coverage run -p --module twisted.trial {posargs:towncrier} | ||
coverage combine -a | ||
|
||
[testenv:build] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this going away? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my bad. I thought that we don't need it and that it was already moved to GitHub CI only. I will revert... My hope was that we can use standard tools without the need of extra tools. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure where you were going so maybe it isn't needed now? It was an honest question. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still need. I am not convinced that we need all this dance... but I think is better to refactor this in another PR. |
||
allowlist_externals = | ||
bash | ||
changedir = {envtmpdir} | ||
deps = | ||
build | ||
check-manifest>=0.44 | ||
twine | ||
setenv = | ||
toxinidir={toxinidir} | ||
skip_install = true | ||
commands = | ||
# could be brought inside tox.ini after https://github.com/tox-dev/tox/issues/1571 | ||
bash {toxinidir}/tox_build.sh | ||
|
||
[testenv:cov-report] | ||
deps = | ||
coverage | ||
skip_install = true | ||
commands = | ||
coverage html | ||
coverage report | ||
|
||
[testenv:cov-erase] | ||
deps = | ||
coverage | ||
skip_install = true | ||
commands = | ||
coverage erase | ||
|
||
[flake8] | ||
# Allow for longer test strings. Code is formatted to 88 columns by Black. | ||
max-line-length = 99 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These days I tend to keep my checks one version behind (3.9 not 3.10). They are there to check the code, not see if the tools work with the latest Python. But definitely not a big deal, just sharing a thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will revert. thanks. no big preference.
Just trying to reduce the number of redirections :)