File tree Expand file tree Collapse file tree 4 files changed +50
-1
lines changed
Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -102,3 +102,39 @@ jobs:
102102 files : ./coverage.xml
103103 flags : unit
104104 fail_ci_if_error : false
105+
106+ dist :
107+ runs-on : ubuntu-latest
108+ name : Python wheel
109+ steps :
110+ - uses : actions/checkout@v1
111+ - uses : actions/setup-python@v2
112+ with :
113+ python-version : " 3.11"
114+ - name : Install dependencies
115+ run : |
116+ pip install -r requirements-test.txt
117+ - name : Build package
118+ run : python -m build -o dist/
119+ - uses : actions/upload-artifact@v2
120+ with :
121+ name : dist
122+ path : dist
123+
124+ test :
125+ runs-on : ubuntu-latest
126+ needs : [dist]
127+ steps :
128+ - uses : actions/checkout@v3
129+ - name : Set up Python
130+ uses : actions/setup-python@v4
131+ with :
132+ python-version : ' 3.11'
133+ - uses : actions/download-artifact@v2
134+ with :
135+ name : dist
136+ path : dist
137+ - name : install dist/*.whl and requirements
138+ run : pip install dist/*.whl -r requirements-test.txt tox
139+ - name : Run tests
140+ run : tox -e install
Original file line number Diff line number Diff line change 1+ build==0.9.0
12coverage==6.5.0
2- pytest==7.1.3
33pytest-console-scripts==1.3.1
44pytest-cov==4.0.0
55pytest-github-actions-annotate-failures==0.1.7
6+ pytest==7.1.3
67PyYaml==5.4.1
78responses==0.21.0
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+
4+ def test_install () -> None :
5+ with pytest .raises (ImportError ):
6+ import httpx # type: ignore # noqa
Original file line number Diff line number Diff line change @@ -128,3 +128,9 @@ commands = pytest tests/smoke {posargs}
128128skip_install = true
129129deps = -r requirements-precommit.txt
130130commands = pre-commit run --all-files --show-diff-on-failure
131+
132+ [testenv:install]
133+ skip_install = true
134+ deps = -r{toxinidir}/requirements.txt
135+ -r{toxinidir}/requirements-test.txt
136+ commands = pytest tests/install
You can’t perform that action at this time.
0 commit comments