Skip to content

Commit

Permalink
Merge pull request #1 from pedrohenrikle/e2e
Browse files Browse the repository at this point in the history
ci: add E2E tests workflow
  • Loading branch information
pedrohenrikle authored Mar 7, 2024
2 parents e2e3923 + 9950dc6 commit 54da6a0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run E2E Tests

on: [pull_request]

jobs:
run-e2e-tests:
name: Run E2E Tests
runs-on: ubuntu-latest

services:
postgres:
image: bitnami/postgresql
ports:
- 5432:5432
env:
POSTGRESQL_USERNAME: docker
POSTGRESQL_PASSWORD: docker
POSTGRESQL_DATABASE: apisolid

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

- run: npm ci

- run: npm run test:e2e
env:
JWT_SECRET: testing
DATABASE_URL: "postgresql://docker:docker@localhost:5432/apisolid?schema=public"
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
"dev": "tsx watch src/server.ts",
"build": "tsup src --out-dir build",
"start": "node build/server.js",
"test": "vitest",
"test:no-repeat": "vitest run",
"test:unit": "vitest --dir src/use-cases",
"test": "vitest run --dir src/use-cases",
"test:watch": "vitest --dir src/use-cases",
"test:e2e": "vitest run --dir src/http",
"test:unit:no-repeat": "vitest run --dir src/use-cases",
"test:e2e:no-repeat": "vitest run --dir src/http",
"test:e2e:watch": "vitest --dir src/http",
"test:coverage": "vitest run --coverage",
"test:ui": "vitest --ui",
"test:ui:unit": "vitest --ui --dir src/use-cases",
"test:ui:e2e": "vitest --ui --dir src/http",
"db": "prisma studio"
"test:ui": "vitest --ui"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 54da6a0

Please sign in to comment.