Skip to content
Snippets Groups Projects
Commit 0ecf3bbe authored by Liora Milbaum's avatar Liora Milbaum Committed by Nejc Habjan
Browse files

chore: validate httpx package is not installed by default

parent 1020ce96
No related branches found
No related tags found
No related merge requests found
......@@ -102,3 +102,39 @@ jobs:
files: ./coverage.xml
flags: unit
fail_ci_if_error: false
dist:
runs-on: ubuntu-latest
name: Python wheel
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -r requirements-test.txt
- name: Build package
run: python -m build -o dist/
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist
test:
runs-on: ubuntu-latest
needs: [dist]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: install dist/*.whl and requirements
run: pip install dist/*.whl -r requirements-test.txt tox
- name: Run tests
run: tox -e install
build==0.9.0
coverage==6.5.0
pytest==7.1.3
pytest-console-scripts==1.3.1
pytest-cov==4.0.0
pytest-github-actions-annotate-failures==0.1.7
pytest==7.1.3
PyYaml==5.4.1
responses==0.21.0
import pytest
def test_install() -> None:
with pytest.raises(ImportError):
import httpx # type: ignore # noqa
......@@ -128,3 +128,9 @@ commands = pytest tests/smoke {posargs}
skip_install = true
deps = -r requirements-precommit.txt
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:install]
skip_install = true
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-test.txt
commands = pytest tests/install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment