1- name : Tests
1+ name : TypeScript - Tests
22
33on :
44 push :
55 branches :
6- - main
76 - master
87 pull_request :
98
2726
2827 - name : Get pnpm store directory
2928 shell : bash
29+ working-directory : sdks/typescript
3030 run : |
3131 echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
3232
@@ -39,10 +39,11 @@ jobs:
3939 ${{ runner.os }}-pnpm-store-
4040
4141 - name : Compile
42+ working-directory : sdks/typescript
4243 run : pnpm compile
4344
4445 - name : Run sdk tests
45- working-directory : packages/sdk
46+ working-directory : sdks/typescript/ packages/sdk
4647 run : pnpm test
4748
4849 # - name: Extract SpacetimeDB branch name from file
@@ -70,42 +71,37 @@ jobs:
7071 # echo "branch=$branch" >> $GITHUB_OUTPUT
7172 # echo "Using SpacetimeDB branch from file: $branch"
7273
73- - name : Checkout SpacetimeDB
74- uses : actions/checkout@v4
75- with :
76- repository : clockworklabs/SpacetimeDB
77- # ref: ${{ steps.extract-branch.outputs.branch }}
78- path : SpacetimeDB
79-
8074 - name : Install Rust toolchain
8175 uses : dtolnay/rust-toolchain@stable
8276
8377 - name : Cache Rust dependencies
8478 uses : Swatinem/rust-cache@v2
8579 with :
86- workspaces : SpacetimeDB/ modules/quickstart-chat
80+ workspaces : modules/quickstart-chat
8781 shared-key : quickstart-chat-test
8882
8983 - name : Install SpacetimeDB CLI from the local checkout
9084 run : |
91- cargo install --force --path SpacetimeDB/ crates/cli --locked --message-format=short
92- cargo install --force --path SpacetimeDB/ crates/standalone --locked --message-format=short
85+ cargo install --force --path crates/cli --locked --message-format=short
86+ cargo install --force --path crates/standalone --locked --message-format=short
9387 # Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
9488 rm -f $HOME/.cargo/bin/spacetime
9589 ln -s $HOME/.cargo/bin/spacetimedb-cli $HOME/.cargo/bin/spacetime
9690 # Clear any existing information
9791 spacetime server clear -y
9892 env :
9993 # Share the target directory with our local project to avoid rebuilding same SpacetimeDB crates twice.
100- CARGO_TARGET_DIR : SpacetimeDB/ modules/quickstart-chat/target
94+ CARGO_TARGET_DIR : modules/quickstart-chat/target
10195
10296 - name : Generate client bindings
103- working-directory : SpacetimeDB/ modules/quickstart-chat
97+ working-directory : modules/quickstart-chat
10498 run : |
105- spacetime generate --lang typescript --out-dir ../../../examples/quickstart-chat/src/module_bindings
99+ spacetime generate --lang typescript --out-dir ../../sdks/typescript/examples/quickstart-chat/src/module_bindings
100+ cd ../../sdks/typescript
106101 pnpm lint --write
107102
108103 - name : Check for changes
104+ working-directory : sdks/typescript
109105 run : |
110106 # This was copied from SpacetimeDB/tools/check-diff.sh.
111107 # It's required because `spacetime generate` creates lines with the SpacetimeDB commit
@@ -133,7 +129,7 @@ jobs:
133129 # spacetime logs quickstart-chat
134130
135131 - name : Check that quickstart-chat builds
136- working-directory : examples/quickstart-chat
132+ working-directory : sdks/typescript/ examples/quickstart-chat
137133 run : pnpm build
138134
139135 # - name: Run quickstart-chat tests
0 commit comments