Skip to content

Commit

Permalink
Add pytest to CI (#114)
Browse files Browse the repository at this point in the history
* Add pytest to CI

ref #113

* Switch back to wheel for unpacking

* Remove timestamps from wheel tree output

* Docs

* Link
  • Loading branch information
hynek committed Apr 2, 2024
1 parent 9e675f9 commit 264bbb8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,25 @@ jobs:
upload-name-suffix: "-structlog"

- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }}

check-pytest:
name: Build & verify the pytest package.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
repository: pytest-dev/pytest
path: pytest

- uses: actions/checkout@v4
with:
path: action

- uses: ./action
id: baipp
with:
path: pytest
upload-name-suffix: "-pytest"

- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

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

### Fixed

- 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*.
To avoid the confusion due to wrong timestamps, the wheel's tree output in the Summary has no timestamps anymore.
[#114](https://github.com/hynek/build-and-inspect-python-package/pull/114)


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

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ To save you from downloading the artifacts just to check their contents, *build-

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


### Examples
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ runs:
if [[ "${{ inputs.skip-wheel }}" != 'true' ]]; then
mkdir -p out/wheels
unzip *.whl -d out/wheels
/tmp/baipp/bin/python -m wheel unpack --dest out/wheels *.whl
echo -e '\n<details><summary>Wheel contents</summary>\n' >> $GITHUB_STEP_SUMMARY
(cd /tmp/baipp/dist/out/wheels && tree -Da --timefmt="%Y-%m-%dT%H:%M:%SZ" * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY)
(cd /tmp/baipp/dist/out/wheels && tree -a * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY)
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
fi
Expand Down
1 change: 1 addition & 0 deletions requirements/tools.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
check-wheel-contents
twine
wheel
3 changes: 3 additions & 0 deletions requirements/tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ urllib3==2.2.1 \
# via
# requests
# twine
wheel==0.43.0 \
--hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
--hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
wheel-filename==1.4.1 \
--hash=sha256:a53d8ece58822eb27b3a8841c6b4bebf357f19ff0dd83ce9179756f64a4bc0df \
--hash=sha256:e2e1eb0780910a0148358252aad6394cc674250686c56c39aa379493438370b3
Expand Down

0 comments on commit 264bbb8

Please sign in to comment.