name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 with:
persist-credentials: false
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 with:
persist-credentials: false
- run: rustup component add llvm-tools
- uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 with:
tool: cargo-llvm-cov
- run: cargo llvm-cov --locked --summary-only --fail-under-lines 98
e2e:
runs-on: ubuntu-latest
env:
PROBATION_E2E_CLIENTS: ${{ github.workspace }}/../e2e-clients
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with:
node-version: v24.19.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 with:
python-version: "3.12"
- name: Install pinned clients
run: |
set -euo pipefail
for v in 10.9.9 12.0.2; do
npm install --prefix "$PROBATION_E2E_CLIENTS/npm-$v" "npm@$v"
done
for v in 25.0.1 26.2.1; do
python3 -m pip install --target "$PROBATION_E2E_CLIENTS/pip-$v" "pip==$v"
done
# The pip tests build their fixture packages with `python -m build --no-isolation`.
python3 -m pip install build==1.2.2 setuptools==78.1.1
echo "PROBATION_E2E_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
- run: cargo test --locked --test e2e_npm --test e2e_pip -- --ignored