-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI for testable sdist & augment MANIFEST.in
- Loading branch information
Showing
3 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include LICENSE.txt README.rst CHANGELOG.md pyproject.toml | ||
include AUTHORS.md LICENSE.txt README.rst CHANGELOG.md pyproject.toml | ||
include requirements-dev.txt requirements-flake8.txt tox.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
jobs: | ||
- job: testable_sdist | ||
displayName: Ensure sdist is testable | ||
|
||
variables: | ||
pip_cache_dir: $(Pipeline.Workspace)/.pip | ||
|
||
pool: | ||
vmImage: 'Ubuntu-latest' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.10' | ||
|
||
- task: Cache@2 | ||
inputs: | ||
key: 'pip | "$(Agent.OS)" | requirements-dev.txt | requirements-flake8.txt' | ||
restoreKeys: | | ||
pip | "$(Agent.OS)" | ||
path: $(pip_cache_dir) | ||
displayName: Cache pip | ||
|
||
- script: python -m pip install build | ||
displayName: Install 'build' package | ||
|
||
- script: | | ||
python -m build -s | ||
ls -lah dist | ||
displayName: Build sdist | ||
- script: | | ||
mkdir sandbox | ||
displayName: Create sandbox | ||
- script: | | ||
cp dist/*.gz sandbox/ | ||
cd sandbox | ||
tar xvf *.gz | ||
displayName: Unpack sdist in sandbox | ||
- script: | | ||
cd sandbox | ||
python -m venv env | ||
displayName: Create venv | ||
# Only the dir of the unpacked sdist will have a digit in its name | ||
- script: | | ||
cd sandbox | ||
echo $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) | ||
displayName: Check unpack dir name | ||
- script: | | ||
cd sandbox | ||
source env/bin/activate | ||
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) | ||
python -m pip install -r requirements-dev.txt | ||
displayName: Install dev req'ts to venv | ||
- script: | | ||
cd sandbox | ||
source env/bin/activate | ||
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) | ||
cd doc | ||
O=-Ean make html | ||
displayName: Build docs in sandbox | ||
- script: | | ||
cd sandbox | ||
source env/bin/activate | ||
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" ) | ||
pytest --nonloc | ||
displayName: Run test suite in sandbox |