Skip to content

Commit

Permalink
Testing run unit tests on each push
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusSanchez committed Jan 25, 2024
1 parent 08c465f commit cd083dc
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run E2E Tests

on: [push]

jobs:
run-e2e-tests:
name: Run E2E Tests
runs-on: ubuntu-latest
env:
DATABASE_URL: "postgresql://docker:docker@localhost:8080/orange-db?schema=public"

services:
postgres:
image: bitnami/postgresql
ports:
- 8080:5432
env:
POSTGRESQL_USERNAME: docker
POSTGRESQL_PASSWORD: docker
POSTGRESQL_DATABASE: orange-db

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- run: pnpm install

- run: pnpm run pretest:e2e
- run: pnpm run test:e2e


22 changes: 22 additions & 0 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run Unit Tests

on: [push]

jobs:
run-unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- run: pnpm install

- run: pnpm run test

0 comments on commit cd083dc

Please sign in to comment.