File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 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
49+ - name : pytest
50+ run : pytest tests/install
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
You can’t perform that action at this time.
0 commit comments