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:
102
102
files : ./coverage.xml
103
103
flags : unit
104
104
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
1
2
coverage==6.5.0
2
- pytest==7.1.3
3
3
pytest-console-scripts==1.3.1
4
4
pytest-cov==4.0.0
5
5
pytest-github-actions-annotate-failures==0.1.7
6
+ pytest==7.1.3
6
7
PyYaml==5.4.1
7
8
responses==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}
128
128
skip_install = true
129
129
deps = -r requirements-precommit.txt
130
130
commands = 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