Skip to content

Commit

Permalink
Merge pull request #2 from henriqueweiand/e2e-fixed
Browse files Browse the repository at this point in the history
fixed tests
  • Loading branch information
henriqueweiand authored Oct 31, 2023
2 parents cb038e3 + efe7d43 commit 12172ff
Show file tree
Hide file tree
Showing 15 changed files with 21,558 additions and 7,362 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/ci.yml

This file was deleted.

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: project

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node
uses: actions/setup-node@v3
with:
node-version: 19.0.1

- run: npm i --force

- run: npm run test:e2e
env:
DATABASE_URL: 'postgresql://docker:docker@localhost:5432/project?schema=public'
23 changes: 23 additions & 0 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run Unit Tests

on: [push]

jobs:
unit-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node
uses: actions/setup-node@v3
with:
node-version: 19.0.1

- name: Install Dependencies
run: npm i --force

- name: Unit testing
run: |
npm run test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
9 changes: 6 additions & 3 deletions test/jest-e2e.json → jest-e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"^.+\\.(t|j)s$": "ts-jest"
},
"moduleNameMapper": {
"@app/common/(.*)": "<rootDir>/../libs/common/src/$1",
"@app/common": "<rootDir>/../libs/common/src"
}
"@app/common/(.*)": "<rootDir>/libs/common/src/$1",
"@app/common": "<rootDir>/libs/common/src"
},
"globalSetup": "./test/setup.ts",
"globalTeardown": "./test/teardown.ts",
"openHandlesTimeout": 10000
}
Loading

0 comments on commit 12172ff

Please sign in to comment.