Repository navigation
56 lines (52 loc) · 1.61 KB
/
Copy pathpython-test.yml
File metadata and controls
56 lines (52 loc) · 1.61 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
name: Python smoke
on:
pull_request:
paths:
- 'crates/eggress-embed/**'
- 'crates/eggress-python/**'
- 'python/**'
- 'tests/compat/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/python-test.yml'
push:
branches: [main]
paths:
- 'crates/eggress-embed/**'
- 'crates/eggress-python/**'
- 'python/**'
- 'tests/compat/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/python-test.yml'
concurrency:
group: python-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
smoke:
name: Python 3.12 smoke
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Create test environment
run: |
python -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install "maturin>=1.0,<2.0" pytest "pytest-asyncio>=0.23,<1" "cryptography>=42,<47"
- name: Build native wheel
run: ../../.venv/bin/maturin build --release --out ../../target/wheels
working-directory: crates/eggress-python
- name: Install packages
run: |
.venv/bin/python -m pip install target/wheels/eggress-*.whl
.venv/bin/python -m pip install --no-deps ./python-pproxy-compat
- name: Run Python smoke suite
run: .venv/bin/python -m pytest python/tests tests/compat -q