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 53b742d commit e55ef00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# 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

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 }}
Expand All @@ -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/[email protected]
env:
Expand Down
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 e55ef00

Please sign in to comment.