test.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: test
  2. on:
  3. push:
  4. branches-ignore:
  5. - production
  6. pull_request:
  7. branches-ignore:
  8. - production
  9. workflow_dispatch:
  10. jobs:
  11. test:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout repository
  15. uses: actions/checkout@v4
  16. with:
  17. token: ${{ secrets.GITHUB_TOKEN }}
  18. - name: Setup Bun
  19. uses: ./.github/actions/setup-bun
  20. - name: run
  21. run: |
  22. git config --global user.email "[email protected]"
  23. git config --global user.name "opencode"
  24. # Ensure generated embed file exists for typecheck with correct shape
  25. mkdir -p packages/opencode/src/webgui
  26. cat << 'EOF' > packages/opencode/src/webgui/embed.generated.ts
  27. export const embeddedWebGui = [
  28. { path: "", data: "" },
  29. ] as const
  30. EOF
  31. bun turbo typecheck
  32. bun turbo test
  33. env:
  34. CI: true
  35. - name: Check SDK is up to date
  36. run: |
  37. bun ./packages/sdk/js/script/build.ts
  38. git diff --exit-code packages/sdk/js/src/gen packages/sdk/js/dist
  39. continue-on-error: false