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 7e1e7d9

Browse filesBrowse files
author
Liora Milbaum
committed
chore: validate httpx package is not installed by default
1 parent 9d2b1ad commit 7e1e7d9
Copy full SHA for 7e1e7d9

File tree

Expand file treeCollapse file tree

4 files changed

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

4 files changed

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

‎.github/workflows/install.yml‎

Copy file name to clipboard
+52Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "Install"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
dist:
13+
runs-on: ubuntu-latest
14+
name: Python wheel
15+
steps:
16+
- uses: actions/checkout@v1
17+
- uses: actions/setup-python@v2
18+
with:
19+
python-version: "3.10"
20+
- name: Install dependencies
21+
run: |
22+
pip install -r requirements-test.txt
23+
- name: Build package
24+
run: python -m build -o dist/
25+
- uses: actions/upload-artifact@v2
26+
with:
27+
name: dist
28+
path: dist
29+
30+
test:
31+
runs-on: ubuntu-latest
32+
needs: [dist]
33+
strategy:
34+
matrix:
35+
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
36+
install-from: ["dist/*.whl"]
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: Set up Python ${{ matrix.python-version }}
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
- uses: actions/download-artifact@v2
44+
with:
45+
name: dist
46+
path: dist
47+
- name: install ${{ matrix.install-from }} and requirements
48+
run: pip install ${{ matrix.install-from }} -r requirements-test.txt tox
49+
- name: Run tests
50+
env:
51+
TOXENV: ${{ matrix.python.toxenv }}
52+
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.