@@ -384,6 +384,8 @@ fn main() -> Result<()> {
384384
385385 match cli. cmd {
386386 Some ( CiCmd :: Test ) => {
387+ cmd ! ( "pnpm" , "build" ) . dir ( "crates/bindings-typescript" ) . run ( ) ?;
388+
387389 // TODO: This doesn't work on at least user Linux machines, because something here apparently uses `sudo`?
388390
389391 // Exclude smoketests from `cargo test --all` since they require pre-built binaries.
@@ -541,6 +543,7 @@ fn main() -> Result<()> {
541543 }
542544
543545 Some ( CiCmd :: Smoketests ( args) ) => {
546+ ensure_repo_root ( ) ?;
544547 smoketest:: run ( args) ?;
545548 }
546549
@@ -551,7 +554,7 @@ fn main() -> Result<()> {
551554 let mut common_args = vec ! [ ] ;
552555 if let Some ( target) = target. as_ref ( ) {
553556 common_args. push ( "--target" ) ;
554- common_args. push ( target. as_str ( ) ) ;
557+ common_args. push ( target) ;
555558 log:: info!( "checking update flow for target: {target}" ) ;
556559 } else {
557560 log:: info!( "checking update flow" ) ;
@@ -565,26 +568,24 @@ fn main() -> Result<()> {
565568 "cargo" ,
566569 [ "build" , "-p" , "spacetimedb-update" ]
567570 . into_iter ( )
568- . chain ( common_args. iter ( ) . copied ( ) ) ,
571+ . chain ( common_args. clone ( ) ) ,
569572 )
570573 . run ( ) ?;
571-
574+ // NOTE(bfops): We need the `github-token-auth` feature because we otherwise tend to get ratelimited when we try to fetch `/releases/latest`.
575+ // My best guess is that, on the GitHub runners, the "anonymous" ratelimit is shared by *all* users of that runner (I think this because it
576+ // happens very frequently on the `macos-runner`, but we haven't seen it on any others).
572577 let root_dir = tempfile:: tempdir ( ) ?;
573- let root_arg = format ! ( "--root-dir={}" , root_dir. path( ) . display( ) ) ;
578+ let root_dir_string = root_dir. path ( ) . to_string_lossy ( ) . to_string ( ) ;
579+ let root_arg = format ! ( "--root-dir={}" , root_dir_string) ;
574580 cmd (
575581 "cargo" ,
576582 [ "run" , "-p" , "spacetimedb-update" ]
577583 . into_iter ( )
578- . chain ( common_args. iter ( ) . copied ( ) )
584+ . chain ( common_args. clone ( ) )
579585 . chain ( [ "--" , "self-install" , & root_arg, "--yes" ] . into_iter ( ) ) ,
580586 )
581587 . run ( ) ?;
582-
583- let mut spacetime_path = root_dir. path ( ) . join ( "spacetime" ) ;
584- if !std:: env:: consts:: EXE_EXTENSION . is_empty ( ) {
585- spacetime_path. set_extension ( std:: env:: consts:: EXE_EXTENSION ) ;
586- }
587- cmd ( spacetime_path, [ & root_arg, "help" ] ) . run ( ) ?;
588+ cmd ! ( format!( "{}/spacetime" , root_dir_string) , & root_arg, "help" , ) . run ( ) ?;
588589 }
589590
590591 Some ( CiCmd :: CliDocs { spacetime_path } ) => {
0 commit comments