A Vite + React + TypeScript + Tailwind v4 site under website/, built from the soulseek-rs design system so the site and the TUI stay one product. The colour tokens in src/index.css are the same values as soulseek-rs/src/ui/styles.rs; change one, change both. The hero is a working recreation of the TUI: it plays one scripted run and then takes the keyboard, or lands on the resting state directly under prefers-reduced-motion. Its sample data is invented or public domain, per the tone-of-voice guardrail against naming copyrighted material. Static output rather than an SPA shell. `bun run build` compiles the client, compiles the same app for Node, then renders every route in src/lib/routes.ts to its own file with that route's title, description and canonical URL. A direct link to /install therefore answers 200 with real markup instead of GitHub's 404 page. routes.ts is keyed into App.tsx by literal path, so adding one without the other fails typecheck rather than shipping a page whose body says "not found" under the right title. Theme is resolved once by an inline script before first paint and adopted by React through useSyncExternalStore, so there is no flash and no hydration mismatch on the toggle. Light mode re-cuts the semantic hues darker: phosphor and tape read on vinyl but wash out on manila. CI and release skip website-only pushes, and Pages skips Rust-only ones. The two Rust workflows share one paths-ignore list so they can only skip together, which keeps the release ci-gate from polling for a run that was never queued. That gate also now treats a cancelled CI as "keep waiting" rather than a failure, since cancel-in-progress cancels the older SHA on every back-to-back push.
111 lines
2.8 KiB
YAML
111 lines
2.8 KiB
YAML
name: CI
|
|
|
|
# Branch pushes are covered by the pull_request trigger. Listening to both for
|
|
# every branch ran the whole matrix twice per PR.
|
|
#
|
|
# website/ holds the GitHub Pages site and no Rust. Ignoring it here must stay
|
|
# in lockstep with the same list in release.yml: the two skip together, so the
|
|
# release ci-gate never waits for a CI run that was never queued. Deliberately
|
|
# not applied to pull_request — CI is a required check there, and a skipped
|
|
# required check leaves the PR permanently unmergeable.
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths-ignore: ['website/**']
|
|
pull_request:
|
|
branches: ['**']
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
|
|
format:
|
|
name: Format Check
|
|
timeout-minutes: 5
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
test:
|
|
name: Test
|
|
timeout-minutes: 20
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
rust: [stable]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run tests
|
|
run: cargo test --verbose
|
|
|
|
e2e:
|
|
name: End-to-end (soulfind)
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install SQLite runtime/dev libraries
|
|
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
|
|
|
|
- name: Install D toolchain (LDC)
|
|
uses: dlang-community/setup-dlang@v2
|
|
with:
|
|
compiler: ldc-latest
|
|
|
|
- name: Build soulfind server
|
|
run: |
|
|
git clone --depth 1 https://github.com/soulfind-dev/soulfind.git soulfind
|
|
dub build :server --root soulfind
|
|
test -x soulfind/bin/soulfind
|
|
echo "SOULFIND_BIN=$PWD/soulfind/bin/soulfind" >> "$GITHUB_ENV"
|
|
|
|
- name: Run e2e tests (required against soulfind)
|
|
env:
|
|
SOULSEEK_E2E_REQUIRED: "1"
|
|
run: cargo test -p soulseek-rs-lib --test e2e -- --nocapture
|