Repository navigation
67 lines (57 loc) · 2.17 KB
/
Copy pathpython-package-conda.yml
File metadata and controls
67 lines (57 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Tests
on: [ push, pull_request ]
env:
CONDA_QUIET: "1"
jobs:
build-linux:
name: Tests
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
with:
path: httpx2-pycurl
- name: Checkout httpx2
uses: actions/checkout@v4
with:
repository: pydantic/httpx2
path: httpx2
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Set up conda
uses: conda-incubator/setup-conda-standalone@00a34805e93a8b640aee5f8a20e8f481ad77e3b4 # v0.1.0
with:
channel: conda-forge
destination-directory: ${{ runner.temp }}/conda-standalone
- name: Configure conda channels
run: |
cat > "$RUNNER_TEMP/condarc" <<'EOF'
channels:
- conda-forge
default_channels: []
channel_priority: strict
EOF
echo "CONDARC=$RUNNER_TEMP/condarc" >> "$GITHUB_ENV"
- name: Create conda environment
run: |
"$CONDA_EXE" create --yes --prefix "$RUNNER_TEMP/conda-env" python=3.11 conda-pypi pytest pytest-asyncio pytest-xprocess nginx trustme httpx2 pycurl h2 chardet backports.zstd brotli-python trio uvicorn cryptography click rich
echo "$RUNNER_TEMP/conda-env/bin" >> "$GITHUB_PATH"
- name: Install dependencies
run: |
"$RUNNER_TEMP/conda-env/bin/conda" pypi install --prefix "$RUNNER_TEMP/conda-env" socksio
"$RUNNER_TEMP/conda-env/bin/conda" pypi install --prefix "$RUNNER_TEMP/conda-env" --editable httpx2-pycurl/
- name: Apply httpx2 patch
run: |
cd httpx2
git apply ../httpx2-pycurl/tests/httpx2-tests.patch
- name: Run httpx2-pycurl tests
run: |
cd httpx2-pycurl
pytest
- name: Run httpx2 tests with httpx2-pycurl transport
run: |
cd httpx2
pytest tests/httpx2 --ignore=tests/httpx2/websockets -o asyncio_default_fixture_loop_scope=fixture-scope -k "not anyio and not test_main and not autodetect and not cp_1252 and not cp1252 and not explicit_encoding" -v