Repository navigation
Merge pull request #197 from ReScienceLab/jump-to #553
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate | |
| # The gates a release has to pass. Nothing here needs a secret, so it runs on | |
| # every pull request; `release.yml` calls this same file before it prepares one, | |
| # which is why `workflow_call` is in the trigger list. | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| versions: | |
| name: Versions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| # The app, the canvas and the toolkit ship as one release, so two of them | |
| # disagreeing is a half-versioned release. | |
| - name: Every file agrees on one version | |
| run: scripts/bump-version.sh --check | |
| - name: Shell scripts parse | |
| run: bash -n scripts/bump-version.sh | |
| canvas: | |
| name: Canvas | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: canvas | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run lint | |
| - run: bun run test | |
| - run: bun run build | |
| # The server starts an agent through cmd.exe on Windows and nowhere else | |
| # (canvas/server/command.ts), so the test of that only runs here. | |
| canvas-windows: | |
| name: Canvas on Windows | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| working-directory: canvas | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run test | |
| # The tests never start the built server, and on Windows it once answered 404 for its own pages. | |
| - name: The built server serves its front page | |
| shell: bash | |
| run: | | |
| bun run build | |
| PROTOTYPING_PROJECTS_DIR="$(mktemp -d)" node dist/server.mjs --port 5199 --open "$(mktemp -d)" & | |
| curl --retry 10 --retry-connrefused --retry-delay 1 -fsSL http://127.0.0.1:5199/ | grep -q 'id="root"' | |
| desktop: | |
| name: macOS app | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: desktop | |
| env: | |
| # Types and the bundler are all these need; the Electron binary is for release.yml. | |
| ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run test | |
| - run: bun run build | |
| tools: | |
| name: Toolkit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@v7 | |
| # The same two lines the README gives for running these locally. | |
| - run: uv run --with pillow --with numpy python tools/test_refkit.py | |
| - run: uv run python tools/test_sp_canvas.py | |
| # The skills call these by name, so a syntax error in one is a broken install | |
| # rather than a broken test. | |
| - run: uv run python -m compileall -q tools skills | |
| - run: node --check skills/sp-create-video/scripts/frames.mjs |