-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
123 lines (87 loc) · 3.46 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
dev-up:
cd dev && tilt up
dev-down:
cd dev && tilt down
next-watch:
cargo watch -s 'cargo nextest run'
clean-deps:
docker compose down -t 1
start-deps:
docker compose up --wait -d integration-deps
setup-db:
cd lana/app && cargo sqlx migrate run
sqlx-prepare:
cd lib/job && cargo sqlx prepare
cd lib/audit && cargo sqlx prepare
cd lib/outbox && cargo sqlx prepare
cd core/governance && cargo sqlx prepare
cd core/customer && cargo sqlx prepare
cd core/user && cargo sqlx prepare
cd core/deposit && cargo sqlx prepare
cd core/chart-of-accounts && cargo sqlx prepare
cd lana/app && cargo sqlx prepare
cd lana/dashboard && cargo sqlx prepare
reset-deps: clean-deps start-deps setup-db
run-server:
cargo run --bin lana-cli --features sim-time -- --config ./bats/lana-sim-time.yml | tee .e2e-logs
run-server-with-bootstrap:
cargo run --bin lana-cli --all-features -- --config ./bats/lana-sim-time.yml | tee .e2e-logs
check-code: sdl customer-sdl
git diff --exit-code lana/customer-server/src/graphql/schema.graphql
git diff --exit-code lana/admin-server/src/graphql/schema.graphql
SQLX_OFFLINE=true cargo fmt --check --all
SQLX_OFFLINE=true cargo check
SQLX_OFFLINE=true cargo clippy --all-features
SQLX_OFFLINE=true cargo audit
clippy:
SQLX_OFFLINE=true cargo clippy --all-features
build:
SQLX_OFFLINE=true cargo build --locked
build-for-tests:
SQLX_OFFLINE=true cargo build --locked --features sim-time
e2e: clean-deps start-deps build-for-tests
bats --setup-suite-file bats/ci-setup-suite.bash -t bats
e2e-in-ci: clean-deps start-deps build-for-tests
lsof -i :5253 | tail -n 1 | cut -d" " -f2 | xargs -L 1 kill -9 || true
SA_CREDS_BASE64=$$(cat ./dev/fake-service-account.json | tr -d '\n' | base64 -w 0) bats --setup-suite-file bats/ci-setup-suite.bash -t bats
sdl:
SQLX_OFFLINE=true cargo run --bin write_sdl > lana/admin-server/src/graphql/schema.graphql
cd apps/admin-panel && pnpm install && pnpm codegen
customer-sdl:
SQLX_OFFLINE=true cargo run --bin write_customer_sdl > lana/customer-server/src/graphql/schema.graphql
test-in-ci: start-deps setup-db
cargo nextest run --verbose --locked
build-x86_64-unknown-linux-musl-release:
SQLX_OFFLINE=true cargo build --release --locked --bin lana-cli --target x86_64-unknown-linux-musl
build-x86_64-apple-darwin-release:
bin/osxcross-compile.sh
start-admin:
cd apps/admin-panel && pnpm install --frozen-lockfile && pnpm dev
start-customer-portal:
cd apps/customer-portal && pnpm install --frozen-lockfile && pnpm dev
check-code-apps: check-code-apps-admin-panel check-code-apps-customer-portal
check-code-apps-admin-panel:
cd apps/admin-panel && pnpm install --frozen-lockfile && pnpm lint && pnpm tsc-check && pnpm build
check-code-apps-customer-portal:
cd apps/customer-portal && pnpm install --frozen-lockfile && pnpm lint && pnpm tsc-check && pnpm build
build-storybook-admin-panel:
cd apps/admin-panel && pnpm install --frozen-lockfile && pnpm run build-storybook
# add https://xxx.ngrok-free.app/sumsub/callback to test integration with sumsub
ngrok:
ngrok http 5253
tilt-in-ci:
./dev/bin/tilt-ci.sh
test-cypress-in-ci-through-browserstack:
cd apps/admin-panel && pnpm cypress:run browserstack
pg2bq-run:
meltano run tap-postgres target-bigquery
bq-pipeline-run:
meltano run dbt-bigquery:run
check-code-pipeline:
meltano invoke sqlfluff:lint
lint-code-pipeline:
meltano invoke sqlfluff:fix
bitfinex-run:
meltano run tap-bitfinexapi target-bigquery
sumsub-run:
meltano run tap-sumsubapi target-bigquery