Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

CI: run the test suite before deploy

Adarsh337c26cf9d88
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 184579e3..cd9f6b76 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -1,12 +1,13 @@
# Builds each push to main on GitHub's runners and sends the build to the server, which installs it.
#
-# Two jobs, so the server's key never meets the code that builds:
+# Three jobs, so the server's key never meets the code that builds or tests:
# - build: no secrets. Checks that no tracked file names the parity studio (scripts/check-neutral-names.mjs),
# installs, typechecks, builds, packs .next with scripts/pack-build.sh, and keeps the
# archive for a week. It holds only compiled code from this public repository: no node_modules, data or env.
-# - deploy: only for pushes to main of this repository, in the "production" environment, whose secrets only
-# it can read. It runs no code from the repository: it downloads the archive, checks its sha256, and sends it
-# over SSH. Its log says only whether the delivery worked.
+# - test: no secrets. Runs the whole test suite in shards, beside the build.
+# - deploy: once build and test both pass, only for pushes to main of this repository, in the "production"
+# environment, whose secrets only it can read. It runs no code from the repository: it downloads the archive,
+# checks its sha256, and sends it over SSH. Its log says only whether the delivery worked.
# The key only hands the file over. The server installs it only when GitHub's own record of this run's artifact
# has the same sha256, so the key alone can't put code on the site.
#
@@ -96,8 +97,61 @@ jobs:
if-no-files-found: error
overwrite: true
+ # The test suite (vitest, with the metric maths in pytest), in shards beside the build: the deploy waits for both.
+ # No secrets. ffmpeg and a Python with the test packages let the media, guard and generator checks run too.
+ test:
+ if: github.repository == 'workingprototype/Fuobe'
+ runs-on: ubuntu-24.04
+ timeout-minutes: 30
+ permissions:
+ contents: read
+ strategy:
+ fail-fast: false
+ matrix:
+ shard: [1, 2, 3, 4, 5, 6, 7, 8]
+ env:
+ NEXT_TELEMETRY_DISABLED: "1"
+ COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
+ FUOBE_TEST_PYTHON: ${{ github.workspace }}/scripts/eval/metrics/.venv/bin/python
+ steps:
+ - name: Check out
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Set up Node
+ uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
+ with:
+ node-version: 22.23.4
+ package-manager-cache: false
+
+ - name: Set up pnpm (the version package.json names)
+ run: |
+ corepack enable
+ pnpm --version
+
+ - name: Install
+ run: pnpm install --frozen-lockfile
+
+ - name: Install ffmpeg
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get install -y -qq --no-install-recommends ffmpeg > /dev/null
+ ffmpeg -hide_banner -version | sed -n 1p
+
+ # The metrics venv (scripts/eval/metrics/.venv, as pnpm eval:setup makes it) with the test packages, and aiohttp
+ # for the ComfyUI and worker guard checks.
+ - name: Set up Python
+ run: |
+ python3 -m venv scripts/eval/metrics/.venv
+ "$FUOBE_TEST_PYTHON" -m pip install -q -r scripts/eval/metrics/requirements-test.txt aiohttp==3.12.15
+ "$FUOBE_TEST_PYTHON" --version
+
+ - name: Test (shard ${{ matrix.shard }} of 8)
+ run: pnpm exec vitest run --shard=${{ matrix.shard }}/8
+
deploy:
- needs: build
+ needs: [build, test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'workingprototype/Fuobe'
runs-on: ubuntu-24.04
timeout-minutes: 15