diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index fb057905..c26b7d74 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -1,7 +1,7 @@ name: test -# Lint + short unit tests only. Integration tests needing Postgres/ffmpeg -# run locally via docker-compose; they should guard with testing.Short(). +# Lint + short unit tests. Integration tests needing Postgres/ffmpeg run +# locally via docker-compose; they should guard with testing.Short(). on: push: @@ -17,6 +17,25 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + cache-dependency-path: web/package-lock.json + + - name: Install web deps + working-directory: web + run: npm ci + + - name: Web build (populates web/build/ for go:embed) + working-directory: web + run: npm run build + + - name: Web test (vitest) + working-directory: web + run: npm test + - name: Detect Go project id: gomod shell: bash