-
-
Notifications
You must be signed in to change notification settings - Fork 106
Run tests in debug mode in an additional CI job #1145
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
Changes from 7 commits
a797c76
f0bdfff
dc6be43
0bf076a
186425c
0d5fd3e
ae0b792
086bccc
1d494d0
91845a8
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 | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -374,6 +374,80 @@ jobs: | |||||||
if: ${{ matrix.os == 'ubuntu' }} | ||||||||
uses: aio-libs/[email protected] | ||||||||
|
||||||||
|
||||||||
test_debug_mode: | ||||||||
name: Test in debug mode | ||||||||
strategy: | ||||||||
matrix: | ||||||||
pyver: | ||||||||
- 3.13t | ||||||||
- 3.13 | ||||||||
- 3.12 | ||||||||
- 3.11 | ||||||||
- "3.10" | ||||||||
- 3.9 | ||||||||
fail-fast: false | ||||||||
runs-on: ubuntu-latest | ||||||||
timeout-minutes: 15 | ||||||||
|
||||||||
steps: | ||||||||
- name: Checkout project | ||||||||
uses: actions/checkout@v4 | ||||||||
- name: Setup Python ${{ matrix.pyver }} | ||||||||
uses: actions/setup-python@v5 | ||||||||
with: | ||||||||
python-version: ${{ matrix.pyver }} | ||||||||
allow-prereleases: true | ||||||||
- name: Get pip cache dir | ||||||||
id: pip-cache | ||||||||
run: | | ||||||||
echo "dir=$(pip cache dir)" >> "${GITHUB_OUTPUT}" | ||||||||
shell: bash | ||||||||
- name: Cache PyPI | ||||||||
uses: actions/cache@v4 | ||||||||
with: | ||||||||
key: >- | ||||||||
pip-ci-${{ | ||||||||
runner.os | ||||||||
}}-${{ | ||||||||
matrix.pyver | ||||||||
}}--${{ | ||||||||
hashFiles('requirements/*.txt') | ||||||||
}} | ||||||||
path: ${{ steps.pip-cache.outputs.dir }} | ||||||||
restore-keys: >- | ||||||||
pip-ci-${{ | ||||||||
runner.os | ||||||||
}}-${{ | ||||||||
matrix.pyver | ||||||||
}}-- | ||||||||
- name: Install dependencies | ||||||||
uses: py-actions/py-dependency-install@v4 | ||||||||
with: | ||||||||
path: requirements/pytest.txt | ||||||||
- name: >- | ||||||||
Self-install source | ||||||||
Comment on lines
+428
to
+429
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. Actually, source is never installed. Only the contents of wheels are. I think, the following will better communicate what this does.
Suggested change
|
||||||||
env: | ||||||||
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. Could you try setting |
||||||||
MULTIDICT_DEBUG_BUILD: Y | ||||||||
bdraco marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
run: >- | ||||||||
python -Im | ||||||||
pip install '.' | ||||||||
- name: Run unittests without coverage | ||||||||
webknjaz marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
run: >- | ||||||||
python -Im pytest tests -v | ||||||||
--no-cov | ||||||||
--c-extensions | ||||||||
- name: Re-run the failing tests with maximum verbosity | ||||||||
if: >- | ||||||||
!cancelled() | ||||||||
&& failure() | ||||||||
run: >- # `exit 1` makes sure that the job remains red with flaky runs | ||||||||
python -Im | ||||||||
pytest --no-cov -vvvvv --lf -rA | ||||||||
--c-extensions | ||||||||
&& exit 1 | ||||||||
shell: bash | ||||||||
|
||||||||
benchmark: | ||||||||
name: Benchmark | ||||||||
needs: | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added the ability to build in debug mode by setting ``MULTIDICT_DEBUG_BUILD`` in the environment -- by :user:`bdraco`. | ||
bdraco marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
Could you change this to checkout from sdist instead of Git? It'll mimic what both pip and downstreams do. And this is what we really want not to crash.
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.
The issue was not about 'cannot build from sdist' but 'cannot build and run tests when debug mode is on'.
I don't think that the installation from sdist makes any difference here.
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.
Downstreams tend to additionally package debug symbols.
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.
What symbols? Could you please elaborate how it does related?