|
80 | 80 | with: |
81 | 81 | node-version: 18 |
82 | 82 |
|
83 | | - - uses: pnpm/action-setup@v4 |
| 83 | + - uses: ./.github/actions/setup-pnpm |
84 | 84 | with: |
85 | 85 | run_install: true |
86 | 86 |
|
@@ -221,7 +221,7 @@ jobs: |
221 | 221 | with: |
222 | 222 | node-version: 22 |
223 | 223 |
|
224 | | - - uses: pnpm/action-setup@v4 |
| 224 | + - uses: ./.github/actions/setup-pnpm |
225 | 225 | with: |
226 | 226 | run_install: true |
227 | 227 |
|
@@ -297,7 +297,7 @@ jobs: |
297 | 297 | with: |
298 | 298 | node-version: 22 |
299 | 299 |
|
300 | | - - uses: pnpm/action-setup@v4 |
| 300 | + - uses: ./.github/actions/setup-pnpm |
301 | 301 | with: |
302 | 302 | run_install: true |
303 | 303 |
|
@@ -524,7 +524,7 @@ jobs: |
524 | 524 | with: |
525 | 525 | node-version: 22 |
526 | 526 |
|
527 | | - - uses: pnpm/action-setup@v4 |
| 527 | + - uses: ./.github/actions/setup-pnpm |
528 | 528 | with: |
529 | 529 | run_install: true |
530 | 530 |
|
@@ -558,39 +558,6 @@ jobs: |
558 | 558 | run: | |
559 | 559 | cargo ci cli-docs |
560 | 560 |
|
561 | | - llm_ci_check: |
562 | | - name: Verify LLM benchmark is up to date |
563 | | - permissions: |
564 | | - contents: read |
565 | | - runs-on: ubuntu-latest |
566 | | - # Disable the tests because they are causing us headaches with merge conflicts and re-runs etc. |
567 | | - if: false |
568 | | - steps: |
569 | | - # Build the tool from master to ensure consistent hash computation |
570 | | - # with the llm-benchmark-update workflow (which also uses master's tool). |
571 | | - - name: Checkout master (build tool from trusted code) |
572 | | - uses: actions/checkout@v4 |
573 | | - with: |
574 | | - ref: master |
575 | | - fetch-depth: 1 |
576 | | - |
577 | | - - uses: dtolnay/rust-toolchain@stable |
578 | | - - uses: Swatinem/rust-cache@v2 |
579 | | - |
580 | | - - name: Install llm-benchmark tool from master |
581 | | - run: | |
582 | | - cargo install --path tools/xtask-llm-benchmark --locked |
583 | | - command -v llm_benchmark |
584 | | -
|
585 | | - # Now checkout the PR branch to verify its benchmark files |
586 | | - - name: Checkout PR branch |
587 | | - uses: actions/checkout@v4 |
588 | | - with: |
589 | | - clean: false |
590 | | - |
591 | | - - name: Run hash check (both langs) |
592 | | - run: llm_benchmark ci-check |
593 | | - |
594 | 561 | unity-testsuite: |
595 | 562 | needs: [lints] |
596 | 563 | # Skip if this is an external contribution. |
@@ -689,7 +656,7 @@ jobs: |
689 | 656 | } |
690 | 657 |
|
691 | 658 | - name: Hydrate Unity SDK DLLs |
692 | | - run: cargo ci dlls |
| 659 | + run: cargo regen csharp dlls |
693 | 660 |
|
694 | 661 | - name: Check Unity meta files |
695 | 662 | uses: DeNA/unity-meta-check@v3 |
@@ -722,12 +689,6 @@ jobs: |
722 | 689 | key: Unity-${{ github.head_ref }} |
723 | 690 | restore-keys: Unity- |
724 | 691 |
|
725 | | - - name: Login to DockerHub |
726 | | - uses: docker/login-action@v2 |
727 | | - with: |
728 | | - username: ${{ vars.DOCKERHUB_USERNAME }} |
729 | | - password: ${{ secrets.DOCKERHUB_PASSWORD }} |
730 | | - |
731 | 692 | - name: Run Unity tests |
732 | 693 | uses: game-ci/unity-test-runner@v4 |
733 | 694 | with: |
@@ -780,7 +741,7 @@ jobs: |
780 | 741 |
|
781 | 742 | - name: Run .NET tests |
782 | 743 | working-directory: sdks/csharp |
783 | | - run: dotnet test -warnaserror --no-restore |
| 744 | + run: dotnet test -warnaserror --no-restore SpacetimeDB.ClientSDK.csproj |
784 | 745 |
|
785 | 746 | - name: Verify C# formatting |
786 | 747 | working-directory: sdks/csharp |
@@ -830,10 +791,9 @@ jobs: |
830 | 791 | ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime |
831 | 792 |
|
832 | 793 | - name: Check quickstart-chat bindings are up to date |
833 | | - working-directory: sdks/csharp |
834 | 794 | run: | |
835 | | - bash tools~/gen-quickstart.sh |
836 | | - "${GITHUB_WORKSPACE}"/tools/check-diff.sh examples~/quickstart-chat || { |
| 795 | + bash sdks/csharp/tools~/gen-quickstart.sh |
| 796 | + tools/check-diff.sh templates/chat-console-cs/module_bindings || { |
837 | 797 | echo 'Error: quickstart-chat bindings have changed. Please run `sdks/csharp/tools~/gen-quickstart.sh`.' |
838 | 798 | exit 1 |
839 | 799 | } |
@@ -889,14 +849,18 @@ jobs: |
889 | 849 | const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha; |
890 | 850 | const publicPrNumber = context.payload.pull_request?.number ?? context.payload.inputs?.pr_number; |
891 | 851 | const preDispatch = new Date().toISOString(); |
| 852 | + const inputs = { public_ref: publicRef }; |
| 853 | + if (publicPrNumber) { |
| 854 | + inputs.public_pr_number = String(publicPrNumber); |
| 855 | + } |
892 | 856 |
|
893 | 857 | // Dispatch the workflow in the target repository |
894 | 858 | await github.rest.actions.createWorkflowDispatch({ |
895 | 859 | owner: targetOwner, |
896 | 860 | repo: targetRepo, |
897 | 861 | workflow_id: workflowId, |
898 | 862 | ref: targetRef, |
899 | | - inputs: { public_ref: publicRef, public_pr_number: String(publicPrNumber) } |
| 863 | + inputs, |
900 | 864 | }); |
901 | 865 | |
902 | 866 | const sleep = (ms) => new Promise(r => setTimeout(r, ms)); |
@@ -1093,7 +1057,7 @@ jobs: |
1093 | 1057 | with: |
1094 | 1058 | node-version: '22' |
1095 | 1059 |
|
1096 | | - - uses: pnpm/action-setup@v4 |
| 1060 | + - uses: ./.github/actions/setup-pnpm |
1097 | 1061 | with: |
1098 | 1062 | run_install: true |
1099 | 1063 |
|
@@ -1130,7 +1094,7 @@ jobs: |
1130 | 1094 | with: |
1131 | 1095 | node-version: 22 |
1132 | 1096 |
|
1133 | | - - uses: pnpm/action-setup@v4 |
| 1097 | + - uses: ./.github/actions/setup-pnpm |
1134 | 1098 | with: |
1135 | 1099 | run_install: true |
1136 | 1100 |
|
@@ -1228,3 +1192,24 @@ jobs: |
1228 | 1192 | # - name: Print rows in the user table |
1229 | 1193 | # if: always() |
1230 | 1194 | # run: spacetime sql quickstart-chat "SELECT * FROM user" |
| 1195 | + |
| 1196 | + version_upgrade_check: |
| 1197 | + runs-on: spacetimedb-new-runner-2 |
| 1198 | + steps: |
| 1199 | + - name: Checkout |
| 1200 | + uses: actions/checkout@v3 |
| 1201 | + - uses: dsherret/rust-toolchain-file@v1 |
| 1202 | + - name: Set default rust toolchain |
| 1203 | + run: rustup default $(rustup show active-toolchain | cut -d' ' -f1) |
| 1204 | + # pnpm is required for regenerating the typescript bindings |
| 1205 | + - name: Set up Node.js |
| 1206 | + uses: actions/setup-node@v4 |
| 1207 | + with: |
| 1208 | + node-version: 20 |
| 1209 | + - uses: ./.github/actions/setup-pnpm |
| 1210 | + with: |
| 1211 | + run_install: true |
| 1212 | + - name: Verify that upgrade-version still works |
| 1213 | + run: cargo ci version-upgrade-check |
| 1214 | + - name: Show diff |
| 1215 | + run: git diff HEAD |
0 commit comments