Skip to content

pd: 🔨 rework RootCommand::start auto-https logic #8008

pd: 🔨 rework RootCommand::start auto-https logic

pd: 🔨 rework RootCommand::start auto-https logic #8008

Workflow file for this run

name: Rust CI
on: pull_request
jobs:
test:
name: Test Suite
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Load rust cache
uses: astriaorg/[email protected]
- name: Run cargo check, failing on warnings
run: cargo check --release --all-targets
env:
# The `-D warnings` option causes an error on warnings;
# we must duplicate the rustflags from `.cargo/config.toml`.
RUSTFLAGS: "-D warnings --cfg tokio_unstable"
# If a dependency was modified, Cargo.lock may flap if not committed.
- name: Check for diffs
shell: bash
run: |
s="$(git status --porcelain)"
if [[ -n "$s" ]]; then
echo "ERROR: found modified files that should be committed:"
echo "$s"
exit 1
else
echo "OK: no uncommitted changes detected"
fi
- name: Run tests with nextest
run: cargo nextest run --release --features migration
env:
CARGO_TERM_COLOR: always
fmt:
name: Rustfmt
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Load rust cache
uses: astriaorg/[email protected]
- run: cargo fmt --all -- --check
docs:
# We use a custom script to generate the index page for https://rustdoc.penumbra.zone,
# and refactors to rust deps can break that generation. Let's ensure this script exits 0
# on PRs, but we'll still only deploy after merge into main.
name: Check that rustdocs build OK
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install rust toolchain
# The script for rustdoc build requires nightly toolchain.
uses: dtolnay/rust-toolchain@nightly
- name: Load rust cache
uses: astriaorg/[email protected]
- name: Build rustdocs
run: ./deployments/scripts/rust-docs
wasm:
name: Build WASM
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Load rust cache
uses: astriaorg/[email protected]
# Download prebuilt binary for wasm-pack; faster than `cargo install`.
- uses: jetli/[email protected]
with:
version: 'latest'
# Ensure that wasm crate builds cleanly. Is this superfluous, given `wasm-pack test` below?
- name: run wasm-pack build
run: wasm-pack build
working-directory: crates/wasm
# Download firefox
- uses: browser-actions/setup-firefox@v1
- run: firefox --version
- name: Run headless browser tests
run: wasm-pack test --headless --firefox -- --test test_build --target wasm32-unknown-unknown --release --features "mock-database"
working-directory: crates/wasm
# Always show the results of `cargo tree`, even if the tests failed, since that
# output will be immediately useful in debugging.
- name: display mio deps
run: cargo tree --invert mio --edges features
if: always()