From fb1e7fddf1e543e108499602739427588203f6f4 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Fri, 5 Sep 2025 01:54:28 -0400 Subject: [PATCH 01/13] :hammer: Attempts at better GH CI/CD action pipeline --- .github/workflows/e2e-tests.yml | 63 ++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 5257c1c..b0ad592 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -7,13 +7,9 @@ on: branches: [ main, develop ] jobs: - e2e-tests: - timeout-minutes: 60 + build: + timeout-minutes: 30 runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - project: [chromium, firefox, webkit, "Mobile Chrome", "Mobile Safari"] steps: - uses: actions/checkout@v4 @@ -62,8 +58,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - cache: 'npm' - cache-dependency-path: 'tests/e2e/package-lock.json' - name: Cache global npm packages uses: actions/cache@v4 @@ -88,23 +82,58 @@ jobs: cd crates/kiko-frontend mkdir -p node_modules npm install tailwindcss --no-save - cd ../../tests/e2e && npm install + + - name: Build Rust project + run: | + cargo build --release + cd crates/kiko-frontend && RUSTFLAGS="-C target-feature=-nontrapping-fptoint" trunk build --release + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-artifacts + path: | + target/release/kiko-backend + crates/kiko-frontend/dist/ + retention-days: 1 + + e2e-tests: + needs: build + timeout-minutes: 30 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + project: [chromium, firefox, webkit, "Mobile Chrome", "Mobile Safari"] + + steps: + - uses: actions/checkout@v4 + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-artifacts + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: 'tests/e2e/package-lock.json' + + - name: Install E2E test dependencies + run: cd tests/e2e && npm install - name: Cache Playwright Browsers uses: actions/cache@v4 with: path: ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ hashFiles('tests/e2e/package-lock.json') }} + key: ${{ runner.os }}-playwright-${{ matrix.project }}-${{ hashFiles('tests/e2e/package-lock.json') }} restore-keys: | - ${{ runner.os }}-playwright- + ${{ runner.os }}-playwright-${{ matrix.project }}- - name: Install Playwright Browsers - run: cd tests/e2e && npx playwright install --with-deps - - - name: Build Rust project - run: | - cargo build --release - cd crates/kiko-frontend && RUSTFLAGS="-C target-feature=-nontrapping-fptoint" trunk build --release + run: cd tests/e2e && npx playwright install --with-deps ${{ matrix.project }} - name: Run E2E tests run: cd tests/e2e && npx playwright test --project="${{ matrix.project }}" From f693548aa135ca76700365a246b362147d83b2e2 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Fri, 5 Sep 2025 02:01:44 -0400 Subject: [PATCH 02/13] :rotating_light: Attempt better caching for playwright browsers --- .github/workflows/e2e-tests.yml | 19 ++++++++++++++----- tests/e2e/package.json | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index b0ad592..fc6ccf4 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -82,6 +82,18 @@ jobs: cd crates/kiko-frontend mkdir -p node_modules npm install tailwindcss --no-save + cd ../../tests/e2e && npm install + + - name: Cache Playwright Browsers + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ hashFiles('tests/e2e/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-playwright- + + - name: Install Playwright Browsers + run: cd tests/e2e && npx playwright install --with-deps - name: Build Rust project run: | @@ -128,12 +140,9 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ matrix.project }}-${{ hashFiles('tests/e2e/package-lock.json') }} + key: ${{ runner.os }}-playwright-${{ hashFiles('tests/e2e/package-lock.json') }} restore-keys: | - ${{ runner.os }}-playwright-${{ matrix.project }}- - - - name: Install Playwright Browsers - run: cd tests/e2e && npx playwright install --with-deps ${{ matrix.project }} + ${{ runner.os }}-playwright- - name: Run E2E tests run: cd tests/e2e && npx playwright test --project="${{ matrix.project }}" diff --git a/tests/e2e/package.json b/tests/e2e/package.json index 4ffee5e..de3e0dc 100644 --- a/tests/e2e/package.json +++ b/tests/e2e/package.json @@ -10,7 +10,7 @@ "test:e2e:debug": "playwright test --debug", "test:e2e:ui": "playwright test --ui", "test:report": "playwright show-report", - "postinstall": "playwright install" + "install:browsers": "playwright install" }, "devDependencies": { "@playwright/test": "^1.40.0" From 91f9987d23480347e7db4190e7c61179f793db78 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Fri, 5 Sep 2025 02:08:14 -0400 Subject: [PATCH 03/13] :hammer: Create ci bash script for running the project without the entire rust toolchain --- bin/ci | 56 +++++++++++++++++++ crates/kiko-frontend/src/components/header.rs | 2 +- tests/e2e/playwright.config.js | 6 +- 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100755 bin/ci diff --git a/bin/ci b/bin/ci new file mode 100755 index 0000000..8c940a9 --- /dev/null +++ b/bin/ci @@ -0,0 +1,56 @@ +#!/bin/bash + +# Simple script to start pre-built servers for CI/E2E testing + +set -e + +# Kill any existing processes on our target ports +echo "๐Ÿงน Cleaning up existing processes..." +lsof -ti:3030 2>/dev/null | xargs kill -9 2>/dev/null || true +lsof -ti:8080 2>/dev/null | xargs kill -9 2>/dev/null || true + +# Start backend from pre-built binary +echo "๐Ÿ“ก Starting backend server..." +./target/release/kiko-backend & +BACKEND_PID=$! + +# Wait for backend to be ready +echo "โณ Waiting for backend to be ready..." +for i in {1..20}; do + if curl -s -f http://localhost:3030/health >/dev/null 2>&1; then + echo "โœ… Backend is ready!" + break + fi + if [ $i -eq 20 ]; then + echo "โŒ Backend failed to start" + kill $BACKEND_PID 2>/dev/null || true + exit 1 + fi + sleep 1 +done + +# Start frontend using built dist files with simple HTTP server +echo "๐ŸŽจ Starting frontend server..." +cd crates/kiko-frontend/dist +python3 -m http.server 8080 & +FRONTEND_PID=$! + +# Wait a bit for frontend to start +sleep 2 + +echo "๐ŸŽ‰ Both servers are running!" +echo "๐Ÿ“ก Backend: http://localhost:3030" +echo "๐ŸŽจ Frontend: http://localhost:8080" + +# Function to cleanup on exit +cleanup() { + echo "๐Ÿ›‘ Shutting down servers..." + kill $BACKEND_PID 2>/dev/null || true + kill $FRONTEND_PID 2>/dev/null || true + exit 0 +} + +trap cleanup EXIT INT TERM + +# Keep script running +wait \ No newline at end of file diff --git a/crates/kiko-frontend/src/components/header.rs b/crates/kiko-frontend/src/components/header.rs index 842ef29..3e2ce9d 100644 --- a/crates/kiko-frontend/src/components/header.rs +++ b/crates/kiko-frontend/src/components/header.rs @@ -7,7 +7,7 @@ pub fn header() -> Html { html! {
-

{ "Kiko Pointing Poker" }

+ { "Kiko ๐Ÿซต" }
diff --git a/tests/e2e/playwright.config.js b/tests/e2e/playwright.config.js index 65803e5..7a5ed39 100644 --- a/tests/e2e/playwright.config.js +++ b/tests/e2e/playwright.config.js @@ -39,7 +39,7 @@ module.exports = defineConfig({ use: { ...devices["Desktop Firefox"] }, }, { - name: "webkit", + name: "webkit", use: { ...devices["Desktop Safari"] }, }, { @@ -54,10 +54,10 @@ module.exports = defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "./bin/dev", + command: process.env.CI ? "./bin/ci" : "./bin/dev", cwd: "../..", url: "http://localhost:8080", reuseExistingServer: !process.env.CI, - timeout: 3 * 60 * 1000, // 3 minutes for server startup + timeout: process.env.CI ? 60 * 1000 : 3 * 60 * 1000, // 1 minute for CI, 3 minutes for dev }, }); From 9dd53024032cf8df84cf5c848514e131824482d7 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Fri, 5 Sep 2025 02:15:27 -0400 Subject: [PATCH 04/13] :hammer: ? Make executable executable? --- bin/ci | 1 + crates/kiko-frontend/src/components/header.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/ci b/bin/ci index 8c940a9..290540a 100755 --- a/bin/ci +++ b/bin/ci @@ -11,6 +11,7 @@ lsof -ti:8080 2>/dev/null | xargs kill -9 2>/dev/null || true # Start backend from pre-built binary echo "๐Ÿ“ก Starting backend server..." +chmod +x ./target/release/kiko-backend ./target/release/kiko-backend & BACKEND_PID=$! diff --git a/crates/kiko-frontend/src/components/header.rs b/crates/kiko-frontend/src/components/header.rs index 3e2ce9d..442bdeb 100644 --- a/crates/kiko-frontend/src/components/header.rs +++ b/crates/kiko-frontend/src/components/header.rs @@ -7,7 +7,10 @@ pub fn header() -> Html { html! {
From 12968edbbcf20cd7d3aee58cf193d593f3eb938e Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Fri, 5 Sep 2025 02:27:26 -0400 Subject: [PATCH 05/13] :hammer: Last attempt, GN --- .github/workflows/e2e-tests.yml | 15 ++++++++------- bin/ci | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index fc6ccf4..769afb6 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -95,17 +95,18 @@ jobs: - name: Install Playwright Browsers run: cd tests/e2e && npx playwright install --with-deps - - name: Build Rust project - run: | - cargo build --release - cd crates/kiko-frontend && RUSTFLAGS="-C target-feature=-nontrapping-fptoint" trunk build --release + - name: Build backend (dev mode) + run: cargo build -p kiko-backend + + - name: Build frontend (release mode) + run: cd crates/kiko-frontend && RUSTFLAGS="-C target-feature=-nontrapping-fptoint" trunk build --release - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: build-artifacts path: | - target/release/kiko-backend + target/debug/kiko-backend crates/kiko-frontend/dist/ retention-days: 1 @@ -153,7 +154,7 @@ jobs: uses: actions/upload-artifact@v4 if: failure() with: - name: playwright-report + name: playwright-report-${{ matrix.project }} path: tests/e2e/playwright-report/ retention-days: 30 @@ -161,6 +162,6 @@ jobs: uses: actions/upload-artifact@v4 if: failure() with: - name: test-screenshots + name: test-screenshots-${{ matrix.project }} path: tests/e2e/test-screenshots/ retention-days: 30 \ No newline at end of file diff --git a/bin/ci b/bin/ci index 290540a..cd44be5 100755 --- a/bin/ci +++ b/bin/ci @@ -11,8 +11,8 @@ lsof -ti:8080 2>/dev/null | xargs kill -9 2>/dev/null || true # Start backend from pre-built binary echo "๐Ÿ“ก Starting backend server..." -chmod +x ./target/release/kiko-backend -./target/release/kiko-backend & +chmod +x ./target/debug/kiko-backend +./target/debug/kiko-backend & BACKEND_PID=$! # Wait for backend to be ready From 4675593cfa20cfc8f054d8c6ac9cf69c12db57e6 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Sun, 7 Sep 2025 23:20:39 -0400 Subject: [PATCH 06/13] :hammer: Try to handle missing browser deps --- .github/workflows/e2e-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 769afb6..692d4ba 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -145,6 +145,11 @@ jobs: restore-keys: | ${{ runner.os }}-playwright- + - name: Install webkit system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwoff1 libopus0 libwebp6 libenchant-2-2 libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libxss1 libevent-2.1-7 libfontconfig1 libfreetype6 + - name: Run E2E tests run: cd tests/e2e && npx playwright test --project="${{ matrix.project }}" env: From 83e6151709b18711364ad007b09d43004b0884ea Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Sun, 7 Sep 2025 23:24:33 -0400 Subject: [PATCH 07/13] :hammer: Try to handle missing browser deps --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 692d4ba..ab6c9cc 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -148,7 +148,7 @@ jobs: - name: Install webkit system dependencies run: | sudo apt-get update - sudo apt-get install -y libwoff1 libopus0 libwebp6 libenchant-2-2 libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libxss1 libevent-2.1-7 libfontconfig1 libfreetype6 + sudo apt-get install -y libwoff1 libopus0 libwebp7 libenchant-2-2 libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libxss1 libevent-2.1-7 libfontconfig1 libfreetype6 - name: Run E2E tests run: cd tests/e2e && npx playwright test --project="${{ matrix.project }}" From 0e776aaa6803decebedfbec49f8f346b9303c437 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Sun, 7 Sep 2025 23:31:04 -0400 Subject: [PATCH 08/13] :hammer: Try to handle missing browser deps --- .github/workflows/e2e-tests.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index ab6c9cc..6494799 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -84,16 +84,6 @@ jobs: npm install tailwindcss --no-save cd ../../tests/e2e && npm install - - name: Cache Playwright Browsers - uses: actions/cache@v4 - with: - path: ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ hashFiles('tests/e2e/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-playwright- - - - name: Install Playwright Browsers - run: cd tests/e2e && npx playwright install --with-deps - name: Build backend (dev mode) run: cargo build -p kiko-backend @@ -137,18 +127,17 @@ jobs: - name: Install E2E test dependencies run: cd tests/e2e && npm install - - name: Cache Playwright Browsers + - name: Cache Playwright Browsers with deps uses: actions/cache@v4 with: path: ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ hashFiles('tests/e2e/package-lock.json') }} + key: ${{ runner.os }}-playwright-${{ matrix.project }}-${{ hashFiles('tests/e2e/package-lock.json') }}-with-deps restore-keys: | + ${{ runner.os }}-playwright-${{ matrix.project }}- ${{ runner.os }}-playwright- - - name: Install webkit system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libwoff1 libopus0 libwebp7 libenchant-2-2 libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libxss1 libevent-2.1-7 libfontconfig1 libfreetype6 + - name: Install Playwright browser with dependencies + run: cd tests/e2e && npx playwright install ${{ matrix.project }} --with-deps - name: Run E2E tests run: cd tests/e2e && npx playwright test --project="${{ matrix.project }}" From 23d90e7a6a0adaa79ba724f6ddc1f607fa4fc08a Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Mon, 8 Sep 2025 00:12:41 -0400 Subject: [PATCH 09/13] :hammer: Fix broken e2e tests --- .github/workflows/e2e-tests.yml | 5 ++++- tests/e2e/package-lock.json | 1 - tests/e2e/playwright.config.js | 8 -------- tests/e2e/src/home-page.spec.js | 3 ++- tests/e2e/src/session-complete.spec.js | 6 +++--- tests/e2e/src/session-page.spec.js | 4 ++-- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 6494799..42f2c9c 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -107,7 +107,7 @@ jobs: strategy: fail-fast: false matrix: - project: [chromium, firefox, webkit, "Mobile Chrome", "Mobile Safari"] + project: [chromium, firefox, webkit] steps: - uses: actions/checkout@v4 @@ -117,6 +117,9 @@ jobs: with: name: build-artifacts + - name: Make backend executable + run: chmod +x target/debug/kiko-backend + - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index b24bde2..4552b5e 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "kiko-e2e-tests", "version": "1.0.0", - "hasInstallScript": true, "devDependencies": { "@playwright/test": "^1.40.0" } diff --git a/tests/e2e/playwright.config.js b/tests/e2e/playwright.config.js index 7a5ed39..b45c47e 100644 --- a/tests/e2e/playwright.config.js +++ b/tests/e2e/playwright.config.js @@ -42,14 +42,6 @@ module.exports = defineConfig({ name: "webkit", use: { ...devices["Desktop Safari"] }, }, - { - name: "Mobile Chrome", - use: { ...devices["Pixel 7"] }, - }, - { - name: "Mobile Safari", - use: { ...devices["iPhone 15"] }, - }, ], /* Run your local dev server before starting the tests */ diff --git a/tests/e2e/src/home-page.spec.js b/tests/e2e/src/home-page.spec.js index 07bd6f1..1e650d6 100644 --- a/tests/e2e/src/home-page.spec.js +++ b/tests/e2e/src/home-page.spec.js @@ -6,7 +6,8 @@ test.describe('Home Page', () => { }); test('should display the main heading', async ({ page }) => { - await expect(page.locator('h1')).toHaveText('Kiko Pointing Poker'); + await expect(page.locator('header a')).toContainText('Kiko'); + await expect(page.locator('header a')).toContainText('๐Ÿซต'); }); test('should display create session form', async ({ page }) => { diff --git a/tests/e2e/src/session-complete.spec.js b/tests/e2e/src/session-complete.spec.js index 0a6b2bc..5daffe1 100644 --- a/tests/e2e/src/session-complete.spec.js +++ b/tests/e2e/src/session-complete.spec.js @@ -49,7 +49,7 @@ test.describe("Complete Session Tests", () => { // Should show main header await expect( - page.getByRole("heading", { name: "Kiko Pointing Poker" }) + page.locator('header a') ).toBeVisible(); // Should show join form since we're not joined @@ -433,7 +433,7 @@ test.describe("Complete Session Tests", () => { // If no connection status visible, at least verify the page loaded if (!foundConnection) { await expect( - page.getByRole("heading", { name: "Kiko Pointing Poker" }) + page.locator('header a') ).toBeVisible(); } }); @@ -451,7 +451,7 @@ test.describe("Complete Session Tests", () => { // Session should still be functional await expect( - page.getByRole("heading", { name: "Kiko Pointing Poker" }) + page.locator('header a') ).toBeVisible(); }); }); diff --git a/tests/e2e/src/session-page.spec.js b/tests/e2e/src/session-page.spec.js index db17d62..684c4d7 100644 --- a/tests/e2e/src/session-page.spec.js +++ b/tests/e2e/src/session-page.spec.js @@ -32,7 +32,7 @@ test.describe("Session Page", () => { await page.goto("/session/nonexistent-session"); // The page should load with the main header - await expect(page.locator("h1")).toHaveText("Kiko Pointing Poker"); + await expect(page.locator('header a')).toContainText('Kiko'); }); test("should show loading state initially", async ({ page }) => { @@ -102,7 +102,7 @@ test.describe("Session Page", () => { // If no specific connection text found, at least check that the page loaded if (!foundConnectionText) { - await expect(page.locator("h1")).toHaveText("Kiko Pointing Poker"); + await expect(page.locator('header a')).toContainText('Kiko'); } }); From e9a9edc472d2f569c656abbf1beb57db37874441 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Mon, 8 Sep 2025 00:34:13 -0400 Subject: [PATCH 10/13] :hammer: Fix broken e2e tests --- tests/e2e/playwright.config.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/e2e/playwright.config.js b/tests/e2e/playwright.config.js index b45c47e..205ae98 100644 --- a/tests/e2e/playwright.config.js +++ b/tests/e2e/playwright.config.js @@ -12,8 +12,8 @@ module.exports = defineConfig({ forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, - /* Use more workers on CI for faster execution */ - workers: process.env.CI ? 4 : undefined, + /* Use single worker on CI to avoid resource contention */ + workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [["html", { open: "never" }]], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ @@ -26,8 +26,15 @@ module.exports = defineConfig({ /* Take screenshot on failure */ screenshot: "only-on-failure", + + /* Increase timeouts for CI */ + actionTimeout: process.env.CI ? 30000 : 10000, + navigationTimeout: process.env.CI ? 45000 : 20000, }, + /* Global test timeout */ + timeout: process.env.CI ? 60000 : 30000, + /* Configure projects for major browsers */ projects: [ { From 0a7eadb55ccada51aa24bdf136edf0cce24f5efd Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Mon, 8 Sep 2025 01:00:43 -0400 Subject: [PATCH 11/13] :hammer: Properly serve FE/BE in CI/CD --- bin/ci | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ci b/bin/ci index cd44be5..51625c6 100755 --- a/bin/ci +++ b/bin/ci @@ -30,10 +30,10 @@ for i in {1..20}; do sleep 1 done -# Start frontend using built dist files with simple HTTP server +# Start frontend using trunk serve in release mode echo "๐ŸŽจ Starting frontend server..." -cd crates/kiko-frontend/dist -python3 -m http.server 8080 & +cd crates/kiko-frontend +trunk serve --release --port 8080 & FRONTEND_PID=$! # Wait a bit for frontend to start From a8e9f8dc501fe1d6b11f95a8479df89249a214b2 Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Mon, 8 Sep 2025 01:03:13 -0400 Subject: [PATCH 12/13] :hammer: Remove overkill timeouts for CI/CD --- tests/e2e/playwright.config.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/e2e/playwright.config.js b/tests/e2e/playwright.config.js index 205ae98..561348b 100644 --- a/tests/e2e/playwright.config.js +++ b/tests/e2e/playwright.config.js @@ -26,15 +26,8 @@ module.exports = defineConfig({ /* Take screenshot on failure */ screenshot: "only-on-failure", - - /* Increase timeouts for CI */ - actionTimeout: process.env.CI ? 30000 : 10000, - navigationTimeout: process.env.CI ? 45000 : 20000, }, - /* Global test timeout */ - timeout: process.env.CI ? 60000 : 30000, - /* Configure projects for major browsers */ projects: [ { From 5977c2c9ce95a8dab20f488ca5d50e178762ed8e Mon Sep 17 00:00:00 2001 From: Zack Kollar Date: Mon, 8 Sep 2025 02:07:18 -0400 Subject: [PATCH 13/13] :hammer: Last attempt at this for the night lol --- .github/workflows/e2e-tests.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 42f2c9c..e6f549a 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -120,6 +120,26 @@ jobs: - name: Make backend executable run: chmod +x target/debug/kiko-backend + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + + - name: Cache Cargo binaries + uses: actions/cache@v4 + with: + path: ~/.cargo/bin/ + key: ${{ runner.os }}-cargo-bin-trunk-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-bin-trunk- + ${{ runner.os }}-cargo-bin- + + - name: Install trunk + run: | + if ! command -v trunk &> /dev/null; then + cargo install trunk --locked + fi + - name: Setup Node.js uses: actions/setup-node@v4 with: