From 893267b8de113c7090b853fa8e509c0e462249d4 Mon Sep 17 00:00:00 2001 From: Surya Kulshreshtha <3709259+suryakulshreshtha@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:07:59 +0000 Subject: [PATCH 1/2] Remove the duplicate e2e workflow, apply every migration in CI, add a CI badge --- .github/workflows/ci.yml | 6 +++- .github/workflows/e2e.yml | 63 --------------------------------------- README.md | 2 ++ 3 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0474f7..4a7ef27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,7 +133,11 @@ jobs: - name: Apply migrations to dev database env: PGPASSWORD: postgres - run: psql -h localhost -U postgres -d forkable_learning -f backend/migrations/001_create_practice_platform_tables.sql + run: | + for f in backend/migrations/*.sql; do + echo "applying $f" + psql -v ON_ERROR_STOP=1 -h localhost -U postgres -d forkable_learning -f "$f" + done - name: Install backend dependencies working-directory: backend diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index d14c595..0000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: End-to-End Tests - -on: - workflow_dispatch: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - e2e: - runs-on: ubuntu-latest - services: - postgres: - image: postgres:16 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: testdb - ports: - - 5432:5432 - options: >- - --health-cmd="pg_isready -U postgres" - --health-interval=10s - --health-timeout=5s - --health-retries=5 - - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Setup Node.js - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: 20 - - - name: Install backend dependencies - run: npm ci - working-directory: backend - - - name: Install frontend dependencies - run: npm ci - working-directory: frontend - - - name: Install e2e dependencies - run: npm ci - working-directory: e2e - - - name: Build backend - run: npm run build - working-directory: backend - - - name: Build frontend - run: npm run build - working-directory: frontend - - - name: Run database migrations - run: npm run migrate - working-directory: backend - - - name: Run Playwright tests - run: npx playwright test - working-directory: e2e diff --git a/README.md b/README.md index 8f40348..0268674 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # ForkableTypescriptPostgreReactNodejsLearning +[![CI](https://github.com/suryakulshreshtha/ForkableTypescriptPostgreReactNodejsLearning/actions/workflows/ci.yml/badge.svg)](https://github.com/suryakulshreshtha/ForkableTypescriptPostgreReactNodejsLearning/actions/workflows/ci.yml) + A small, fully-tested full-stack reference app — built the way an SDET would build it, with a real test pyramid instead of an afterthought. Fork it, run it, break it, and use it as a template for your own TypeScript + React + Node.js + PostgreSQL projects. **Stack:** React 18 · TypeScript · Node.js / Express · PostgreSQL From 301f1311de326541645babeaf0f368439c929b95 Mon Sep 17 00:00:00 2001 From: Surya Kulshreshtha <3709259+suryakulshreshtha@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:38:11 +0000 Subject: [PATCH 2/2] Pin the runner to ubuntu-24.04 GitHub has announced that the ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026 (actions/runner-images#14748). Pinning keeps the image these workflows run on today, so nothing changes now, and moving to 26 becomes a change you make on purpose and can test. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a7ef27..68d7464 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: backend: name: Backend (lint, type-check, unit + integration tests) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 services: postgres: @@ -72,7 +72,7 @@ jobs: frontend: name: Frontend (lint, type-check, unit tests, build) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -105,7 +105,7 @@ jobs: e2e: name: End-to-end tests (Playwright) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: [backend, frontend] services: