Skip to content

Commit 264bbb8

Browse files
authored
Add pytest to CI (#114)
* Add pytest to CI ref #113 * Switch back to wheel for unpacking * Remove timestamps from wheel tree output * Docs * Link
1 parent 9e675f9 commit 264bbb8

File tree

6 files changed

+36
-3
lines changed

6 files changed

+36
-3
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,25 @@ jobs:
5454
upload-name-suffix: "-structlog"
5555

5656
- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }}
57+
58+
check-pytest:
59+
name: Build & verify the pytest package.
60+
runs-on: ubuntu-latest
61+
62+
steps:
63+
- uses: actions/checkout@v4
64+
with:
65+
repository: pytest-dev/pytest
66+
path: pytest
67+
68+
- uses: actions/checkout@v4
69+
with:
70+
path: action
71+
72+
- uses: ./action
73+
id: baipp
74+
with:
75+
path: pytest
76+
upload-name-suffix: "-pytest"
77+
78+
- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77

88
## [Unreleased](https://github.com/hynek/build-and-inspect-python-package/compare/v2.2.0...main)
99

10+
### Fixed
11+
12+
- The action uses *wheel* to unpack wheels again (this is a revert of [#103](https://github.com/hynek/build-and-inspect-python-package/pull/103)) due to [incompatibilities](https://github.com/hynek/build-and-inspect-python-package/issues/113) with, for example, *pytest*.
13+
To avoid the confusion due to wrong timestamps, the wheel's tree output in the Summary has no timestamps anymore.
14+
[#114](https://github.com/hynek/build-and-inspect-python-package/pull/114)
15+
1016

1117
## [2.2.0](https://github.com/hynek/build-and-inspect-python-package/compare/v2.1.0...v2.2.0) - 2024-03-31
1218

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ To save you from downloading the artifacts just to check their contents, *build-
132132

133133
- **SDist contents**: A tree of the source distribution.
134134
- **Wheel contents**: A tree of the built wheel – if one was built.
135-
- **Metadata**: A dump of package metadata (includes the PyPI README).
135+
This output has no timestamps because `wheel unpack` does not preserve them from the built wheel, leading to confusion.
136+
- **Metadata**: A plain-text dump of package metadata (includes the PyPI README).
136137

137138

138139
### Examples

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ runs:
139139
140140
if [[ "${{ inputs.skip-wheel }}" != 'true' ]]; then
141141
mkdir -p out/wheels
142-
unzip *.whl -d out/wheels
142+
/tmp/baipp/bin/python -m wheel unpack --dest out/wheels *.whl
143143
144144
echo -e '\n<details><summary>Wheel contents</summary>\n' >> $GITHUB_STEP_SUMMARY
145-
(cd /tmp/baipp/dist/out/wheels && tree -Da --timefmt="%Y-%m-%dT%H:%M:%SZ" * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY)
145+
(cd /tmp/baipp/dist/out/wheels && tree -a * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY)
146146
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
147147
fi
148148

requirements/tools.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build
22
check-wheel-contents
33
twine
4+
wheel

requirements/tools.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ urllib3==2.2.1 \
427427
# via
428428
# requests
429429
# twine
430+
wheel==0.43.0 \
431+
--hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
432+
--hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
430433
wheel-filename==1.4.1 \
431434
--hash=sha256:a53d8ece58822eb27b3a8841c6b4bebf357f19ff0dd83ce9179756f64a4bc0df \
432435
--hash=sha256:e2e1eb0780910a0148358252aad6394cc674250686c56c39aa379493438370b3

0 commit comments

Comments
 (0)