From caf9cde08f0ba2373e6652429c23b7ad3e1562fe Mon Sep 17 00:00:00 2001 From: Stavros Date: Mon, 10 Feb 2025 18:28:06 +0200 Subject: [PATCH] tests: add frontend build to ci --- .github/workflows/ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79d4576..36764d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,24 @@ jobs: with: go-version: "^1.23.2" - - name: Create simple UI for testing + - name: Setup bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install frontend dependencies run: | - mkdir -p internal/assets/dist - echo "Hello, World!" > internal/assets/dist/index.html + cd site + bun install + + - name: Build frontend + run: | + cd site + bun run build + + - name: Copy frontend + run: | + cp -r site/dist internal/assets/dist - name: Run tests run: go test -v ./...