diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f471cc15..0dcc8300 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,3 +1,4 @@ +# This workflow will install node dependencies, run tests and report coverage # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs name: build @@ -5,19 +6,16 @@ name: build on: push: branches: - - develop - feat-test-CI-implementation-187419042 - pull_request: branches: - - develop + - feat-test-CI-implementation-187419042 jobs: test: runs-on: ubuntu-latest env: - DB_DIALECT: postgres DB_TEST_URL: ${{ secrets.DB_TEST_URL }} DEV_MODE: ${{ secrets.DEV_MODE }} DB_HOSTED_MODE: ${{ secrets.DB_HOSTED_MODE }} @@ -35,14 +33,8 @@ jobs: cache: "npm" - name: Install dependencies run: npm install - - - name: Print DB_TEST_URL - run: | - echo "DB_TEST_URL: ${{ secrets.DB_TEST_URL }}" - - name: Run tests and build test coverage run: npm run test:ci - - name: Test & publish code coverage uses: paambaati/codeclimate-action@v5.0.0 env: diff --git a/README.md b/README.md index 65a6b80a..32a5727f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/0f9cac26fd6bc0a2f7a9/maintainability)](https://codeclimate.com/github/atlp-rwanda/hackers-ec-be/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/0f9cac26fd6bc0a2f7a9/test_coverage)](https://codeclimate.com/github/atlp-rwanda/hackers-ec-be/test_coverage) + ![](https://img.shields.io/badge/Express.js-404D59?style=for-the-badge) ![](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white) diff --git a/src/database/config/db.config.ts b/src/database/config/db.config.ts index 6c0c3493..4e69d43e 100644 --- a/src/database/config/db.config.ts +++ b/src/database/config/db.config.ts @@ -47,9 +47,7 @@ export const connectionToDatabase = () => sequelizeConnection .authenticate() .then(() => { - sequelizeConnection.sync().then(() => { - console.log("Database connected successfully.", db_uri); - }); + console.log("Database connected successfully.", db_uri); }) .catch((error) => { console.error("Unable to connect to the database:", error);