Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 17 additions & 81 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,94 +6,30 @@ on:
pull_request:
branches: [main]

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings

jobs:
check:
name: Check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --all-targets

test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace

fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check

clippy:
name: Clippy
rust:
name: Rust smoke
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets -- -D warnings

deny:
name: Deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2

audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-audit
# RUSTSEC-2025-0134: rustls-pemfile is unmaintained. The crate is the
# only published version on crates.io and is needed by eggress-transport-tls
# for PEM cert chain loading. Tracked for removal once a maintained
# successor (or upstream rustls integration) is available.
- run: cargo audit --ignore RUSTSEC-2025-0134

interoperability:
name: Interoperability (Ubuntu)
runs-on: ubuntu-latest
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"
- run: pip install "pproxy==2.7.9"
- run: cargo test -p eggress-cli --test interoperability_pproxy -- --ignored --skip test_pproxy_http_server_eggress_client --skip test_pproxy_socks5_server_eggress_client
env:
EGRESS_REQUIRE_EXTERNAL_INTEROP: "1"
# curl interop tests require curl binary — skip in CI until
# a dedicated runner with curl is provisioned
# - run: cargo test -p eggress-cli --test interoperability_curl -- --ignored
# env:
# EGRESS_REQUIRE_CURL_INTEROP: "1"

- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --workspace --locked
58 changes: 0 additions & 58 deletions .github/workflows/pproxy-compat.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/publish-pypi.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/python-compat.yml

This file was deleted.

67 changes: 30 additions & 37 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,58 @@
name: Python Tests
name: Python smoke

on:
pull_request:
paths:
- 'crates/eggress-embed/**'
- 'crates/eggress-python/**'
- 'python/**'
- 'python-pproxy-compat/**'
- 'tests/compat/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/python-test.yml'
push:
branches: [main]
paths:
- 'crates/eggress-embed/**'
- 'crates/eggress-python/**'
- 'python/**'
- 'python-pproxy-compat/**'
- 'tests/compat/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/python-test.yml'
workflow_dispatch:

concurrency:
group: python-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ${{ matrix.os }}
smoke:
name: Python 3.12 smoke
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install maturin
python-version: '3.12'
- name: Create test environment
run: |
python -m venv .venv
source .venv/bin/activate
pip install "maturin>=1.0,<2.0"
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> "$GITHUB_ENV"
echo "${{ github.workspace }}/.venv/bin" >> "$GITHUB_PATH"
- name: Clean stale native extension
# Maturin leaves a per-build `_eggress.cpython-*.so` under python/eggress/
# which is .gitignored. If a stale build from a different architecture
# or Python interpreter is present, pytest collection will fail with
# import errors. Remove any such stale artifacts before building.
run: git clean -fX python/eggress
- name: Build and install
run: maturin develop
.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: Build and install pproxy compat wheel
run: pip wheel --no-deps --wheel-dir /tmp/compat-wheels ./python-pproxy-compat && pip install /tmp/compat-wheels/eggress_pproxy_compat-*.whl
- name: Verify py.typed
run: python -c "import importlib.resources; p = importlib.resources.files('eggress').joinpath('py.typed'); assert p.is_file(), 'py.typed not found'; print('py.typed found')"
- name: Syntax check
run: python -m compileall python/eggress
- name: Install test dependencies
run: pip install pytest "pytest-asyncio>=0.23,<1" "tomli; python_version < '3.11'" "cryptography>=42,<47"
- name: Run tests
run: python -m pytest python/tests -v
- name: Wheel import smoke tests
run: python -m pytest python/tests/test_wheel_import_smoke.py -v
- name: API contract validator tests
run: python -m pytest tests/compat/test_pproxy_api_contract.py -v
- 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
Loading
Loading