Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ecf3bb

Browse filesBrowse files
Liora Milbaumnejch
authored andcommitted
chore: validate httpx package is not installed by default
1 parent 1020ce9 commit 0ecf3bb
Copy full SHA for 0ecf3bb

File tree

Expand file treeCollapse file tree

4 files changed

+50
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+50
-1
lines changed
Open diff view settings
Collapse file

‎.github/workflows/test.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff 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
Collapse file

‎requirements-test.txt‎

Copy file name to clipboard
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
build==0.9.0
12
coverage==6.5.0
2-
pytest==7.1.3
33
pytest-console-scripts==1.3.1
44
pytest-cov==4.0.0
55
pytest-github-actions-annotate-failures==0.1.7
6+
pytest==7.1.3
67
PyYaml==5.4.1
78
responses==0.21.0
Collapse file

‎tests/install/test_install.py‎

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pytest
2+
3+
4+
def test_install() -> None:
5+
with pytest.raises(ImportError):
6+
import httpx # type: ignore # noqa
Collapse file

‎tox.ini‎

Copy file name to clipboardExpand all lines: tox.ini
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,9 @@ commands = pytest tests/smoke {posargs}
128128
skip_install = true
129129
deps = -r requirements-precommit.txt
130130
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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.