Skip to content

Commit

Permalink
Run tests on sdists in CI (#100)
Browse files Browse the repository at this point in the history
* CODECOV_TOKEN is not required by upload-artifact

See details: https://hynek.me/articles/ditch-codecov-python/

* Run tests on sdists

* Explicitly include tests/*.py

* Update changelog

* Fix 0.2.10 release date
  • Loading branch information
GalaxySnail authored Nov 21, 2023
1 parent 041f625 commit d2a930e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,23 @@ jobs:
python -Im pip install tox
fi
- name: Prepare sdist and source-dir
shell: bash
run: |
if [[ ${{ matrix.python-version }} = *2.7 ]]; then
python -m pip install build
python -m build
else
python -Im pip install build
python -Im build
fi
mkdir source-dir
tar -xzvf dist/wcwidth-*.tar.gz -C source-dir --strip-components=1
- name: Run tests
shell: bash
working-directory: ./source-dir
run: |
if [[ ${{ matrix.python-version }} = *2.7 ]]; then
python -m tox -e ${{ env.TOX_PYTHON }}
Expand All @@ -94,9 +109,11 @@ jobs:
- name: Rename coverage data
shell: bash
working-directory: ./source-dir
run: |
if test -f .coverage; then
mv .coverage{,.${{ matrix.os }}.${{ env.TOX_PYTHON }}.$(date +"%Y-%m-%d_%H%M%S")}
mv .coverage.* ..
fi
- name: Upload coverage data
Expand Down Expand Up @@ -150,5 +167,3 @@ jobs:
name: html-report
path: htmlcov
if: ${{ failure() }}
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ include requirements-*.in requirements-*.txt
recursive-include bin *.py
recursive-include code_templates *.j2
recursive-include docs *.py *.rst requirements.txt
recursive-include tests *.txt
recursive-include tests *.py *.txt
7 changes: 6 additions & 1 deletion docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ Other Languages
=======
History
=======
0.2.10 *2023-11-08*
0.2.11 *2023-11-??*
* Include tests files in the source distibution (`PR #98`_, `PR #100`_).

0.2.10 *2023-11-13*
* **Bugfix** accounting of some kinds of emoji sequences using U+FE0F
Variation Selector 16 (`PR #97`_).
* **Updated** `Specification <Specification_from_pypi_>`_.
Expand Down Expand Up @@ -325,6 +328,8 @@ https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c::
.. _`PR #82`: https://github.com/jquast/wcwidth/pull/82
.. _`PR #91`: https://github.com/jquast/wcwidth/pull/91
.. _`PR #97`: https://github.com/jquast/wcwidth/pull/97
.. _`PR #98`: https://github.com/jquast/wcwidth/pull/98
.. _`PR #100`: https://github.com/jquast/wcwidth/pull/100
.. _`jquast/blessed`: https://github.com/jquast/blessed
.. _`selectel/pyte`: https://github.com/selectel/pyte
.. _`thomasballinger/curtsies`: https://github.com/thomasballinger/curtsies
Expand Down

0 comments on commit d2a930e

Please sign in to comment.