-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (73 loc) · 3.27 KB
/
Makefile
File metadata and controls
91 lines (73 loc) · 3.27 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
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
.PHONY: build sync api-snapshot ct cti cwt cwti
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
make test-protocols;
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
gt:
make generate-protocol-tests
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/check-dependencies.js;
node ./scripts/runtime-dep-version-check.js;
make test-browser;
yarn g:vitest run -c vitest.config.integ.mts;
make test-types;
make test-bundlers;
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'
api-snapshot:
yarn build
node scripts/validation/api-snapshot-validation.js --write
git diff --exit-code api-snapshot/
S ?= $(word 2,$(MAKECMDGOALS))
# make ct retry, for example, to run a subset of core unit tests.
ct:
cd packages/core && yarn g:vitest run src/submodules/$(S)
cwt:
cd packages/core && yarn g:vitest watch src/submodules/$(S)
# same as ct, but for integration tests.
cti:
cd packages/core && yarn g:vitest run -c vitest.config.integ.mts src/submodules/$(S)
cwti:
cd packages/core && yarn g:vitest watch -c vitest.config.integ.mts src/submodules/$(S)
# swallow extra positional args (e.g. make ct endpoints)
%:
@: