remora/Makefile

137 lines
4.1 KiB
Makefile

.PHONY: check-dependencies check-fixture-lib check-kind-sample check-durable check-coordination check-identity check-credentials check-admission check-attempt check-attempt-mutations check-recovery check-worker-api check-public-api check-live-events check-worker check-stream check-target check-result check-deletion check-outbound check-http-source check-object-source check-hf-source check-deployment check-requirements check-qualification-kind check-qualification check-fast check-full check-fast-host check-full-host contract-check rust-check web-install web-check web-test-fast web-test-full
CONTAINER_ENGINE ?= nerdctl
CONTAINER_RUN_FLAGS ?= --memory=16g --memory-swap=24g --cpus=4
PLAYWRIGHT_BROWSERS_PATH := $(CURDIR)/web/.cache/ms-playwright
export PLAYWRIGHT_BROWSERS_PATH
contract-check:
npm ci --prefix contracts/typespec
npm ci --prefix contracts/typespec-rust-emitter
npm run check --prefix contracts/typespec
rust-check: contract-check
cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo nextest run --workspace --all-features
cargo test --workspace --doc
web-install:
pnpm --dir web install --frozen-lockfile
web-check: web-install
pnpm --dir web check
pnpm --dir web lint
pnpm --dir web build
web-test-fast: web-install
pnpm --dir web exec playwright install chromium
pnpm --dir web test:unit
pnpm --dir web test:component
pnpm --dir web test:e2e
web-test-full: web-install
pnpm --dir web exec playwright install chromium firefox webkit
pnpm --dir web test:unit
pnpm --dir web test:component:full
pnpm --dir web test:e2e:full
check-fast: check-fixture-lib contract-check
$(CONTAINER_ENGINE) build --file Dockerfile.test --target rust-check --tag remora-rust-check:local .
$(CONTAINER_ENGINE) run --rm $(CONTAINER_RUN_FLAGS) remora-rust-check:local
$(CONTAINER_ENGINE) build --file Dockerfile.test --target web-fast --tag remora-web-check:local .
$(CONTAINER_ENGINE) run --rm $(CONTAINER_RUN_FLAGS) remora-web-check:local
check-full: check-fixture-lib contract-check
$(CONTAINER_ENGINE) build --file Dockerfile.test --target rust-check --tag remora-rust-check:local .
$(CONTAINER_ENGINE) run --rm $(CONTAINER_RUN_FLAGS) remora-rust-check:local
$(CONTAINER_ENGINE) build --file Dockerfile.test --target web-full --tag remora-web-check:local .
$(CONTAINER_ENGINE) run --rm $(CONTAINER_RUN_FLAGS) remora-web-check:local
check-fast-host: rust-check web-check web-test-fast
check-full-host: rust-check web-check web-test-full
check-dependencies:
./tests/kind/fixture/run.sh
check-fixture-lib:
./tests/kind/fixture/lib-test.sh
check-kind-sample:
./tests/kind/sample/run.sh
check-durable:
./tests/kind/durable/run.sh
check-coordination:
./tests/kind/coordination/run.sh
check-identity:
./tests/kind/identity/run.sh
check-credentials:
./tests/kind/credentials/run.sh
check-admission:
./tests/kind/admission/run.sh
check-attempt:
./tests/kind/attempt/run.sh
check-attempt-mutations:
./tests/kind/attempt/run-mutations.sh
check-recovery:
./tests/kind/attempt/run-recovery.sh
check-worker-api:
./tests/kind/api/run-worker.sh
check-public-api:
./tests/kind/api/run-public.sh
check-live-events:
./tests/kind/api/run-live-events.sh
check-worker:
./tests/kind/worker/run.sh
check-stream:
cargo fmt --all --check
cargo clippy --package remora-stream --all-targets --all-features -- -D warnings
cargo nextest run --package remora-stream --all-features
cargo test --package remora-stream --doc
check-target:
./tests/kind/target/run.sh
check-result:
./tests/kind/result/run.sh
check-deletion:
./tests/kind/deletion/run.sh
check-outbound:
./tests/kind/outbound/run.sh
check-http-source:
./tests/kind/http-source/run.sh
check-object-source:
./tests/kind/object-source/run.sh
check-hf-source:
./tests/kind/hf-source/run.sh
check-deployment:
./tests/kind/deployment/run.sh
check-requirements:
./tests/qualification/check-requirements.sh
check-qualification-kind:
./tests/kind/qualification/run.sh
REMORA_SYSTEM_QUALIFICATION=1 ./tests/kind/deployment/run.sh
check-qualification: check-requirements check-full check-qualification-kind