-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (34 loc) · 1.58 KB
/
Makefile
File metadata and controls
39 lines (34 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.PHONY: codegen update-schema check test test-online
# Fetch the latest Linear GraphQL schema + regenerate SDK types.
# No API key required — Linear's introspection endpoint is public.
update-schema:
cargo run -p lineark-codegen -- --fetch
# Run codegen from the local schema (no fetch).
codegen:
cargo run -p lineark-codegen
# Lint, doc, and build checks (no tests).
check:
cargo fmt --check
cargo run -q -p lineark-lint
cargo clippy --workspace -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps
cargo build --workspace
cargo test --workspace --no-run
# Run offline tests (unit + integration). Safe, fast, no API token needed.
test:
cargo test --workspace --lib
cargo test --workspace --test offline
# Run online tests against the live Linear API. Requires ~/.linear_api_token_test.
# Cleans the test workspace before running to avoid stale resource conflicts.
# test_with's custom harness runs tests sequentially and aborts on first panic.
#
# Linear's API has a known transient failure mode on `*Create` mutations
# (returns "conflict on insert" with a UUID it just generated, with no
# matching record server-side — confirmed by `read` returning "not found").
# The per-call `run_lineark_with_retry` helper in
# `crates/lineark/tests/online.rs` retries up to 15 times with body
# mutation (~9 min worst case per call), persistent enough that a single
# unlucky test no longer needs a suite-level wrapper to compensate.
test-online:
cargo run -p lineark-test-utils --bin cleanup-test-workspace
cargo test --workspace --test online -- --test-threads=1