-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.sh
executable file
·34 lines (23 loc) · 787 Bytes
/
test.sh
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
#!/bin/bash
# die if anything goes wrong
set -euxo pipefail
# replace twitter output with something that typechecks
echo "export const a = 1" | tee ./output/twitter/output.ts
# replace github output with something that typechecks
echo "export const a = 1" | tee ./output/github/output.ts
# install shit
yarn install
# run tests
yarn test
# compile typescript
yarn build
# run codegen basic
yarn graphql-codegen --config ./test/twitter/codegen.yml
# typecheck result
yarn tsc --noEmit ./output/twitter/output.ts
# run codegen advanced
yarn graphql-codegen --config ./test/github/codegen.yml
# typecheck advanced result
yarn tsc --noEmit ./output/github/output.ts
# output some shit (only from the basic one, the advanced one blows the stack)
yarn ts-node ./test/test-output.ts