Skip to content

Commit b344096

Browse files
authored
Merge pull request statsmodels#8872 from bashtage/add-install-test-and-sdist
MAINT: Add CI for install and sdist install
2 parents cf35f04 + 33adb4b commit b344096

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

tools/ci/azure/azure_template_posix.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ jobs:
2020
python_311_latest:
2121
python.version: '3.11'
2222
lint: true
23-
python_310_latest:
23+
python_310_latest_install:
2424
python.version: '3.10'
2525
lint: true
26+
test.install: true
27+
python_310_latest_install_sdist:
28+
python.version: '3.10'
29+
test.install: true
30+
TEST_SDIST: true
2631
python_39:
2732
python.version: '3.9'
2833
USE_MATPLOTLIB: false
@@ -40,6 +45,7 @@ jobs:
4045
MATPLOTLIB: 3.2.2
4146
coverage: true
4247
PYTEST_OPTIONS: ''
48+
lint: true
4349
python_38_legacy_blas:
4450
python.version: '3.8'
4551
use.conda: true
@@ -56,7 +62,6 @@ jobs:
5662
SCIPY: 1.6.3
5763
PANDAS: 1.1.5
5864
MATPLOTLIB: 3.4.3
59-
lint: true
6065
python_311_pre:
6166
python.version: '3.11'
6267
pip.pre: true
@@ -90,9 +95,16 @@ jobs:
9095
9196
- script: |
9297
echo "Installing to site packages"
93-
python -m pip wheel .
94-
WHL=$(ls -t dist)
95-
python -m pip install ./dist/${WHL}
98+
if [[ $TEST_SDIST ]]; then
99+
python -m build . --sdist
100+
TAIL=".tar.gz"
101+
else
102+
python -m pip wheel . -w ./dist -v
103+
TAIL=".whl"
104+
fi
105+
ls -t dist/statsmodels*${TAIL}
106+
PKG_NAME=$(ls -t dist/statsmodels*${TAIL})
107+
python -m pip install ./${PKG_NAME}
96108
displayName: 'Install statsmodels (site-packages)'
97109
condition: eq(variables['test.install'], 'true')
98110
@@ -115,7 +127,7 @@ jobs:
115127
echo "Testing site packages"
116128
mkdir test_run_dir
117129
pushd test_run_dir
118-
python -c "import statsmodels; statsmodels.test(['-n', 'auto', '--junitxml=../junit/test-results.xml', '--skip-examples'])"
130+
python -c "import statsmodels; statsmodels.test(['-n', 'auto', '--junitxml=../junit/test-results.xml', '--skip-examples', '--dist', 'loadscope', '--durations=25'], exit=True)"
119131
popd
120132
displayName: 'Run tests (site-packages)'
121133
condition: eq(variables['test.install'], 'true')

tools/ci/azure/install-posix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ else
1414
CMD="python -m pip install numpy"
1515
fi
1616

17-
python -m pip install --upgrade "pip~=22.0.4" setuptools wheel
17+
python -m pip install --upgrade pip setuptools wheel build
1818
python -m pip install "cython>=0.29.28,<3.0.0" "pytest~=7.0.1" pytest-xdist coverage pytest-cov ipython jupyter notebook nbconvert "property_cached>=1.6.3" black==20.8b1 isort flake8 nbconvert==5.6.1 coveralls setuptools_scm[toml]~=7.0.0
1919

2020
if [[ -n ${NUMPY} ]]; then CMD="$CMD==${NUMPY}"; fi;

0 commit comments

Comments
 (0)