Skip to content

Commit

Permalink
chore(Github action):Update node.js.yml by add other environment vari…
Browse files Browse the repository at this point in the history
…ables
  • Loading branch information
Hakizimana-Clement committed Apr 19, 2024
1 parent fd6bc68 commit 6191dc2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 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

on:
push:
branches:
- develop
- feat-test-CI-implementation-187419042

- develop
pull_request:
branches:
- develop
Expand All @@ -17,7 +17,6 @@ jobs:
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 }}
Expand All @@ -36,10 +35,6 @@ jobs:
- 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

Expand All @@ -50,3 +45,5 @@ jobs:
with:
coverageCommand: npm run test:ci
debug: true
coverageLocations: |
${{github.workspace}}/*.lcov:lcov
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions src/database/config/db.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6191dc2

Please sign in to comment.