From d44e3efe5acfcf41240b83035f4a694c0e27d463 Mon Sep 17 00:00:00 2001 From: Marcelle Date: Fri, 27 Feb 2026 17:49:35 -0300 Subject: [PATCH 1/2] ci: add e2e tests --- .github/workflows/run-e2e-tests.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/run-e2e-tests.yml diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml new file mode 100644 index 0000000..2bc166a --- /dev/null +++ b/.github/workflows/run-e2e-tests.yml @@ -0,0 +1,41 @@ +name: Run E2E Tests + +on: [pull_request] + +jobs: + run-e2e-tests: + name: Run E2E Tests + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + + services: + postgres: + image: bitnami/postgresql + ports: + - 5432:5432 + env: + POSTGRESQL_USERNAME: docker + POSTGRESQL_PASSWORD: docker + POSTGRESQL_DATABASE: apisolid + + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + + - name: Generate Prisma client + run: pnpm prisma generate + env: + JWT_SECRET: testing + DATABASE_URL: 'postgresql://docker:docker@localhost:5432/apisolid?schema=public' + + - run: pnpm run test:e2e From 06b19cef068db2caf0204922395ef0587890b349 Mon Sep 17 00:00:00 2001 From: Marcelle Date: Fri, 27 Feb 2026 17:54:31 -0300 Subject: [PATCH 2/2] ci: fix missing env vars and add migration step to e2e workflow --- .github/workflows/run-e2e-tests.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 2bc166a..c6b779d 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -10,6 +10,10 @@ jobs: matrix: node-version: [20] + env: + JWT_SECRET: testing + DATABASE_URL: 'postgresql://docker:docker@localhost:5432/apisolid?schema=public' + services: postgres: image: bitnami/postgresql @@ -34,8 +38,8 @@ jobs: - name: Generate Prisma client run: pnpm prisma generate - env: - JWT_SECRET: testing - DATABASE_URL: 'postgresql://docker:docker@localhost:5432/apisolid?schema=public' + + - name: Run Prisma migrations + run: pnpm prisma migrate deploy - run: pnpm run test:e2e