Skip to content

Commit a52f97b

Browse files
committed
PICARD-1935: Include tests in sdist
Verify in CI the sdist package is complete and passes tests.
1 parent 91ee5f9 commit a52f97b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/run-tests.yml

+5
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,8 @@ jobs:
113113
- name: Test running installed package
114114
if: runner.os != 'Windows'
115115
run: picard --long-version
116+
- name: Verify sdist package
117+
if: runner.os != 'Windows'
118+
run: |
119+
pip install pytest
120+
scripts/package/run-sdist-test.sh

MANIFEST.in

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
graft po
2-
prune test
32

43
recursive-include scripts *.in
54
recursive-exclude scripts picard
@@ -9,4 +8,8 @@ include *.in
98
include *.md
109
include *.txt
1110

11+
recursive-include test *.py
12+
recursive-include test/data *
13+
1214
exclude org.musicbrainz.Picard.appdata.xml
15+
exclude win-version-info.txt

scripts/package/run-sdist-test.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# Build the sdist archive, extract it and run the tests.
4+
5+
set -e
6+
7+
rm -rf dist
8+
python3 setup.py sdist
9+
cd dist
10+
SDIST_ARCHIVE=$(echo picard-*.tar.gz)
11+
tar xvf "$SDIST_ARCHIVE"
12+
cd "${SDIST_ARCHIVE%.tar.gz}"
13+
pytest --verbose

0 commit comments

Comments
 (0)