Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8756e4a
add GitHub Actions CI
codeandsolder Aug 27, 2026
35056d0
make formatting failures actionable
codeandsolder Aug 27, 2026
69a8426
fix CI-exposed build and formatting issues
codeandsolder Aug 27, 2026
2ae8e50
ci: fix JWT tests for validated UserId
codeandsolder Aug 27, 2026
8c0ee6d
ci: make E2E asset paths workspace-absolute
codeandsolder Aug 27, 2026
00aca46
ci: include Stylance source in cargo-chef cook
codeandsolder Aug 27, 2026
b7c9c24
ci: disable unused SQLx default drivers
codeandsolder Aug 27, 2026
5cae073
ci: fix cargo-leptos invocation and asset paths
codeandsolder Aug 27, 2026
eadda7a
fix benchmark UserId construction
codeandsolder Aug 27, 2026
7356361
fix live-search SSR feature selection
codeandsolder Aug 27, 2026
5c23220
fix RWF environment prefix parsing
codeandsolder Aug 27, 2026
8673e87
make Leptos artifact checks output-name agnostic
codeandsolder Aug 27, 2026
ac0aecd
make SSE connection state race-free
codeandsolder Aug 27, 2026
d565727
configure rustfmt for Rust 2024
codeandsolder Aug 27, 2026
c1800d4
format benchmark
codeandsolder Aug 27, 2026
02c295c
format SSE client
codeandsolder Aug 27, 2026
601fc3f
ci: temporarily commit refreshed lockfile
codeandsolder Aug 27, 2026
cf90945
chore: refresh audited lockfile
github-actions[bot] Aug 27, 2026
60d368a
ci: restore read-only lockfile verification
codeandsolder Aug 27, 2026
9114866
Fix i18n WebSocket module gating for WASM
codeandsolder Aug 27, 2026
4d9151c
Make dependency audit read-only
codeandsolder Aug 27, 2026
da375b0
Remove CSR-only forms dependency from live search UI
codeandsolder Aug 27, 2026
a7b6aba
Drop leptos-forms from live search feature graph
codeandsolder Aug 27, 2026
f10e1d2
Remove unused leptos-forms workspace dependency
codeandsolder Aug 27, 2026
0279021
Resolve lockfile changes in CI
codeandsolder Aug 27, 2026
dfff5df
Apply rustfmt to live-search app
codeandsolder Aug 27, 2026
24e1873
Let CI repair the generated lockfile once
codeandsolder Aug 27, 2026
13610d1
Refresh Cargo.lock
github-actions[bot] Aug 27, 2026
60548d2
Make lockfile verification non-mutating
codeandsolder Aug 27, 2026
227000b
Fix live-search hydration asset naming
codeandsolder Aug 27, 2026
4963a8c
Fix i18n demo Clippy const suggestion
codeandsolder Aug 27, 2026
055f6e7
Document intentional async Axum handler
codeandsolder Aug 27, 2026
381df6e
Remove redundant CORS must-use attribute
codeandsolder Aug 27, 2026
8f170e1
Fix live-search shutdown Clippy warnings
codeandsolder Aug 27, 2026
eeee5df
Fix live-search bootstrap doc lints
codeandsolder Aug 27, 2026
c5deac7
Document development settings errors
codeandsolder Aug 27, 2026
6cfb1b7
Document auth handler error paths
codeandsolder Aug 27, 2026
1228318
Fix gateway Clippy ownership warnings
codeandsolder Aug 27, 2026
e864ad2
Fix live-search database Clippy warnings
codeandsolder Aug 27, 2026
b84653e
Fix Leptos hydration entry point
codeandsolder Aug 27, 2026
2bdebee
Fix i18n hydration entry point
codeandsolder Aug 27, 2026
07e34bf
Fix E2E Leptos config loading
codeandsolder Aug 27, 2026
9b7f2e0
Match manual wasm-bindgen hydration assets
codeandsolder Aug 27, 2026
03f2fd8
Assert canonical hydration loader assets
codeandsolder Aug 27, 2026
f2a26c6
Fix Clippy doc formatting
codeandsolder Aug 27, 2026
b2ce7d8
Restore formatted file newline
codeandsolder Aug 27, 2026
b731563
Speed up CI and fix Clippy
codeandsolder Aug 28, 2026
4703ce3
Cache incremental Clippy builds
codeandsolder Aug 28, 2026
d959199
Cache Rust builds with sccache
codeandsolder Aug 28, 2026
eee0744
Fix sccache stats commands
codeandsolder Aug 28, 2026
c7883a4
Persist compiler and Docker caches
codeandsolder Aug 28, 2026
a8ad8d2
Fix SSE connected event barrier
codeandsolder Aug 28, 2026
a9d3be7
Fix Docker sccache cache mounts
codeandsolder Aug 28, 2026
3ab7d41
Make Docker dependency caching deterministic
codeandsolder Aug 28, 2026
7a86630
Align gateway cargo-chef target selection
codeandsolder Aug 28, 2026
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
346 changes: 346 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,346 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

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

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"

jobs:
lockfile:
name: Lockfile consistency
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- name: Install pinned Rust toolchain
run: rustup toolchain install 1.94.0 --profile minimal
- name: Verify lockfile is current
run: cargo metadata --locked --format-version 1 >/dev/null

format:
name: Format
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal --component rustfmt
rustc --version
cargo --version
- name: Restore leptosfmt
id: leptosfmt-cache
uses: actions/cache@v5
with:
path: ~/.cargo/bin/leptosfmt
key: ci-tool-${{ runner.os }}-leptosfmt-0.1.33
- name: Install Leptos formatter
if: steps.leptosfmt-cache.outputs.cache-hit != 'true'
run: cargo +stable install leptosfmt --version 0.1.33 --locked
- name: Generate canonical formatting
id: format
run: |
cargo fmt --all
while IFS= read -r -d '' f; do
leptosfmt --rustfmt --stdin --quiet < "$f" > "$f.tmp"
mv "$f.tmp" "$f"
done < <(find live-search i18n-demo -name '*.rs' -print0)
cargo fmt --all

if git diff --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
git diff --name-only -- '*.rs' > /tmp/formatted-files.txt
tar -czf /tmp/formatted-rust.tar.gz -T /tmp/formatted-files.txt
git diff --stat
fi
- name: Upload formatter output
if: steps.format.outputs.changed == 'true'
uses: actions/upload-artifact@v7
with:
name: formatted-rust
path: /tmp/formatted-rust.tar.gz
retention-days: 1
- name: Verify formatting
if: steps.format.outputs.changed == 'true'
run: git diff --exit-code

clippy:
name: Clippy (native)
runs-on: ubuntu-24.04
timeout-minutes: 30
# Unlike sccache, Cargo's target directory can preserve Clippy metadata and
# rustc incremental state. The repository pins rustc, so this is safe to
# reuse across successive commits to the same PR.
env:
CARGO_INCREMENTAL: "1"
steps:
- uses: actions/checkout@v7
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal --component clippy
rustc --version
cargo --version
- name: Restore Clippy build cache
uses: actions/cache@v5
with:
path: |
target/debug/.fingerprint
target/debug/build
target/debug/deps
target/debug/examples
target/debug/incremental
key: clippy-target-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock') }}-${{ github.sha }}
restore-keys: |
clippy-target-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock') }}-
clippy-target-v1-${{ runner.os }}-rust-1.94.0-
- name: Clippy
run: |
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo clippy --locked -p live-search --features ssr --all-targets -- -D warnings
cargo clippy --locked -p live-search --features ssr,otel --all-targets -- -D warnings
cargo clippy --locked -p gateway-example --features otel --all-targets -- -D warnings
cargo clippy --locked -p i18n-demo --features ssr --all-targets -- -D warnings
- name: Report Clippy cache footprint
if: always()
run: du -sh target/debug 2>/dev/null || true

wasm-check:
name: WASM check (${{ matrix.package }})
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
package:
- live-search
- i18n-demo
steps:
- uses: actions/checkout@v7
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal --target wasm32-unknown-unknown
rustc --version
cargo --version
- name: Check hydration build
run: cargo check --locked -p "${{ matrix.package }}" --target wasm32-unknown-unknown --features hydrate --lib

unit-tests:
name: Unit tests
runs-on: ubuntu-24.04
timeout-minutes: 30
# sccache's GHA object backend currently drops writes when concurrent jobs
# hit GitHub's per-run cache-service rate limit. Keep a local sccache store
# and transfer it once through actions/cache instead.
env:
SCCACHE_DIR: ${{ github.workspace }}/.sccache/unit-tests
SCCACHE_CACHE_SIZE: "1G"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v7
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.11
with:
version: "v0.17.0"
- name: Restore unit-test compiler cache
uses: actions/cache@v5
with:
path: .sccache/unit-tests
key: sccache-unit-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }}
restore-keys: |
sccache-unit-v1-${{ runner.os }}-rust-1.94.0-
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal
rustc --version
cargo --version
- name: Run library tests
run: cargo test --locked --workspace --lib
- name: Show sccache stats
if: always()
run: ${SCCACHE_PATH} --show-stats

audit:
name: Dependency audit
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal
rustc --version
cargo --version
- name: Restore cargo-audit
id: cargo-audit-cache
uses: actions/cache@v5
with:
path: ~/.cargo/bin/cargo-audit
key: ci-tool-${{ runner.os }}-cargo-audit-0.22.2
- name: Install cargo-audit
if: steps.cargo-audit-cache.outputs.cache-hit != 'true'
run: cargo +stable install cargo-audit --version 0.22.2 --locked
# Audit the exact dependency graph committed to the repository. CI must
# not mutate Cargo.lock first: both targeted patched versions are already
# present, and `cargo update -p` can legitimately rewrite unrelated
# transitive edges even when the requested package version is unchanged.
- name: Audit dependencies
run: cargo audit

leptos-build:
name: Leptos production builds
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
SCCACHE_DIR: ${{ github.workspace }}/.sccache/leptos-build
SCCACHE_CACHE_SIZE: "2G"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v7
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.11
with:
version: "v0.17.0"
- name: Restore production compiler cache
uses: actions/cache@v5
with:
path: .sccache/leptos-build
key: sccache-leptos-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }}
restore-keys: |
sccache-leptos-v1-${{ runner.os }}-rust-1.94.0-
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal --target wasm32-unknown-unknown
rustc --version
cargo --version
- name: Restore Leptos build tools
id: leptos-tools-cache
uses: actions/cache@v5
with:
path: |
~/.cargo/bin/cargo-leptos
~/.cargo/bin/stylance
key: ci-tools-${{ runner.os }}-cargo-leptos-0.3.7-stylance-0.8.4
- name: Install build tools
if: steps.leptos-tools-cache.outputs.cache-hit != 'true'
run: |
cargo +stable install cargo-leptos --version 0.3.7 --locked
cargo +stable install stylance-cli --version 0.8.4 --locked
- name: Build live-search
run: |
cargo leptos build --release -p live-search
mkdir -p target/site/pkg
stylance live-search --output-file target/site/pkg/live-search.css
find target/site/pkg -maxdepth 1 -type f -name '*.js' -size +0c -print -quit | grep -q .
find target/site/pkg -maxdepth 1 -type f -name '*.wasm' -size +0c -print -quit | grep -q .
test -s target/site/pkg/live-search.css
- name: Build i18n-demo
run: cargo leptos build --release -p i18n-demo
- name: Show sccache stats
if: always()
run: ${SCCACHE_PATH} --show-stats

docker-build:
name: Docker image (${{ matrix.image }})
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- image: live-search
dockerfile: live-search.Dockerfile
tag: rwf-live-search:test
- image: i18n-demo
dockerfile: i18n-demo.Dockerfile
tag: rwf-i18n-demo:test
- image: gateway
dockerfile: gateway.Dockerfile
tag: rwf-gateway:test
env:
DOCKER_BUILD_RECORD_UPLOAD: "false"
steps:
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4.3.0
- name: Build image
uses: docker/build-push-action@v7.3.0
with:
context: .
file: ${{ matrix.dockerfile }}
tags: ${{ matrix.tag }}
load: true
cache-from: type=gha,scope=docker-${{ matrix.image }}
cache-to: type=gha,mode=max,scope=docker-${{ matrix.image }}

e2e-tests:
name: Browser + integration E2E
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
SCCACHE_DIR: ${{ github.workspace }}/.sccache/e2e
SCCACHE_CACHE_SIZE: "2G"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v7
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.11
with:
version: "v0.17.0"
- name: Restore E2E compiler cache
uses: actions/cache@v5
with:
path: .sccache/e2e
key: sccache-e2e-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }}
restore-keys: |
sccache-e2e-v1-${{ runner.os }}-rust-1.94.0-
- name: Install pinned Rust toolchain
run: |
rustup toolchain install 1.94.0 --profile minimal --target wasm32-unknown-unknown
rustc --version
cargo --version
- name: Restore E2E build tools
id: e2e-tools-cache
uses: actions/cache@v5
with:
path: |
~/.cargo/bin/wasm-bindgen
~/.cargo/bin/stylance
key: ci-tools-${{ runner.os }}-wasm-bindgen-cli-0.2.126-stylance-0.8.4
- name: Install E2E build tools
if: steps.e2e-tools-cache.outputs.cache-hit != 'true'
run: |
cargo +stable install wasm-bindgen-cli --version 0.2.126 --locked
cargo +stable install stylance-cli --version 0.8.4 --locked
- name: Configure Chrome
shell: bash
run: |
CHROME_PATH="$(command -v google-chrome || command -v chromium || true)"
if [ -z "$CHROME_PATH" ]; then
echo "No Chrome/Chromium executable found on the GitHub-hosted runner" >&2
exit 1
fi
echo "CHROME_PATH=$CHROME_PATH" >> "$GITHUB_ENV"
"$CHROME_PATH" --version
- name: Verify Docker
run: docker version
- name: Run E2E suite
run: bash scripts/test-e2e.sh
- name: Show sccache stats
if: always()
run: ${SCCACHE_PATH} --show-stats
Loading