-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (52 loc) · 2.57 KB
/
Makefile
File metadata and controls
65 lines (52 loc) · 2.57 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
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
.PHONY: build sync
build:
./gradlew clean build publishToMavenLocal
sync:
gh repo sync $$GITHUB_USERNAME/smithy-typescript -b main
git fetch --all
generate-protocol-tests:
rm -rf ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen
./gradlew :smithy-typescript-protocol-test-codegen:build
rm -rf ./private/smithy-rpcv2-cbor
rm -rf ./private/smithy-rpcv2-cbor-schema
rm -rf ./private/my-local-model
rm -rf ./private/my-local-model-schema
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/smithy-rpcv2-cbor/typescript-codegen ./private/smithy-rpcv2-cbor
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/smithy-rpcv2-cbor-schema/typescript-codegen ./private/smithy-rpcv2-cbor-schema
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/my-local-model/typescript-client-codegen/ ./private/my-local-model
cp -r ./smithy-typescript-protocol-test-codegen/build/smithyprojections/smithy-typescript-protocol-test-codegen/my-local-model-schema/typescript-client-codegen/ ./private/my-local-model-schema
node ./scripts/post-protocol-test-codegen
yarn
yarn turbo run build -F="./private/*" --only
test-protocols:
(cd ./private/smithy-rpcv2-cbor && npx vitest run --globals && yarn test:index)
(cd ./private/smithy-rpcv2-cbor-schema && npx vitest run --globals && yarn test:index)
(cd ./private/my-local-model-schema && npx vitest run --globals && yarn test:index)
(cd ./private/smithy-rpcv2-cbor-schema && yarn test:integration)
(cd ./private/my-local-model-schema && yarn test:integration)
benchmark:
(cd ./private/my-local-model-schema && npx vitest run --globals)
# "build generate test"
bgt:
make build generate-protocol-tests test-protocols
gt:
make generate-protocol-tests test-protocols
test-unit:
yarn g:vitest run -c vitest.config.mts
test-browser:
yarn g:vitest run -c vitest.config.browser.mts
test-bundlers:
(cd ./testbed/bundlers && make run)
# typecheck for test code.
test-types:
npx tsc -p tsconfig.test.json
test-integration:
node ./scripts/validation/no-generic-byte-arrays.js
node ./scripts/validation/api-snapshot-validation.js
make test-browser
yarn g:vitest run -c vitest.config.integ.mts
make test-types
turbo-clean:
@read -p "Are you sure you want to delete your local cache? [y/N]: " ans && [ $${ans:-N} = y ]
@echo "\nDeleted cache folders: \n--------"
@find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' + && echo '\n'