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
2 changes: 2 additions & 0 deletions just/db.just
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test *ARGS:
# database tests migrate the database.
# Fail unless the query cache matches exactly what the code compiles against
# TEST_DATABASE_URL's migrated schema.
[doc("Fail unless the query cache matches the code against TEST_DATABASE_URL's schema.")]
prepare-check:
#!/usr/bin/env bash
set -euo pipefail
Expand Down Expand Up @@ -44,6 +45,7 @@ _prepare *ARGS:
# Run a command against a throwaway migrated cluster, e.g. `just db scratch -- psql`.
# Every test fixture pools a few connections, and nextest runs one test per core,
# so the cluster allows more than PostgreSQL's hundred.
[doc("Run a command against a throwaway migrated cluster, e.g. `just db scratch -- psql`.")]
[positional-arguments]
scratch *ARGS:
#!/usr/bin/env bash
Expand Down
3 changes: 3 additions & 0 deletions just/rust.just
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ check:
# The workspace unifies features, so a published crate's feature that needs
# another it doesn't enable still builds there. Checking each crate with no
# features, then each feature alone, builds them as a dependent might.
[doc("Check each published crate with no features, then with each feature alone.")]
features:
#!/usr/bin/env bash
set -euo pipefail
Expand All @@ -25,6 +26,7 @@ fmt-check:
# The workspace pass unifies features, so a crate's own tests can compile only
# because another crate's dev-dependency enables a feature such as `test-util`.
# Linting each crate alone too catches that.
[doc("Clippy over the workspace, then over each crate alone, with warnings denied.")]
lint:
#!/usr/bin/env bash
set -euo pipefail
Expand All @@ -40,6 +42,7 @@ unused:
# Advisories, licenses, wildcard requirements and sources other than crates.io,
# as deny.toml configures them. Every feature is on, so the audit covers what
# the SDKs' features pull in even when no workspace crate enables them.
[doc("Advisories, licenses, wildcards and sources other than crates.io, by cargo-deny.")]
audit:
@cargo deny --all-features check

Expand Down
2 changes: 2 additions & 0 deletions just/web.just
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ lint:

# The TypeScript SDK's unit tests, every shared vector included, with line, branch
# and function coverage of its sources.
[doc("The TypeScript SDK's unit tests and shared vectors, with coverage of its sources.")]
test:
@pnpm test

Expand All @@ -27,6 +28,7 @@ smoke:

# Builds the TypeScript SDK first, as browser-client.spec.ts serves the built package.
# Requires a running auth service; see tests/browser/README.md.
[doc("Run the browser suite against a running auth service; see tests/browser/README.md.")]
[positional-arguments]
test-browser *ARGS:
@pnpm --filter @sourceorigin/auth build
Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ install:

# Cargo tools used by the test, coverage, audit, database and docs recipes. CI
# installs mdBook and lychee at the same versions.
[doc("Install the Cargo tools the test, coverage, audit, database and docs recipes use.")]
install-tools: db::install-sqlx
@cargo install --locked cargo-nextest cargo-llvm-cov cargo-deny cargo-machete cargo-semver-checks
@cargo install --locked mdbook@0.5.4 lychee@0.24.2
Expand All @@ -38,6 +39,7 @@ install-tools: db::install-sqlx
# skipping versions already published; see docs/dev/releasing.md. `--dry-run`
# packages and builds them without uploading; `--allow-dirty` allows uncommitted
# changes.
[doc("Publish the SDKs: the Rust crates to crates.io, then @sourceorigin/auth to npm.")]
[positional-arguments]
publish *ARGS:
@cargo xtask publish "$@"
Expand All @@ -46,6 +48,7 @@ publish *ARGS:
# commit, create its GitHub release and close its milestone; see
# docs/dev/releasing.md. `--dry-run` runs the checks and the publish dry run, and
# only prints the other steps and the release notes.
[doc("Release the workspace version from the latest main; see docs/dev/releasing.md.")]
[positional-arguments]
release *ARGS:
@cargo xtask release "$@"
Expand Down Expand Up @@ -110,6 +113,7 @@ sdk-vectors:
# Regenerate the TypeScript SDK's wire types and shared constants,
# packages/auth/src/protocol.ts, from sourceorigin_common::protocol; `just test`
# fails while the committed file is stale.
[doc("Regenerate packages/auth/src/protocol.ts from sourceorigin_common::protocol.")]
sdk-types:
@UPDATE_SDK_TYPES=1 cargo nextest run --locked -p sourceorigin-common --lib protocol::typescript

Expand Down