Skip to content

Commit

Permalink
chore(readme): Update node.js.yml to work on all pushed branches
Browse files Browse the repository at this point in the history
- Changed from "feat-test-CI-implementation-187419042" to "*" for all branches pushed.

[Finishes #187419042]
  • Loading branch information
Hakizimana-Clement committed Apr 20, 2024
1 parent 6191dc2 commit 0252bf6
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ on:
push:
branches:
- feat-test-CI-implementation-187419042
- "*"
- develop

pull_request:
branches:
- develop
Expand Down Expand Up @@ -38,7 +40,7 @@ jobs:
- name: Run tests and build test coverage
run: npm run test:ci

- name: Test & publish code coverage
- name: Test & publish code climate coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
[![Coverage Status](https://coveralls.io/repos/github/atlp-rwanda/hackers-ec-be/badge.svg?branch=feat-test-CI-implementation-187419042)](https://coveralls.io/github/atlp-rwanda/hackers-ec-be?branch=feat-test-CI-implementation-187419042)

[![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)

![](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge&logo=postgresql&logoColor=white)

![](https://img.shields.io/badge/sequelize-323330?style=for-the-badge&logo=sequelize&logoColor=blue)

![](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)

![](https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge&logo=github-actions&logoColor=white)

![](https://img.shields.io/badge/Jest-323330?style=for-the-badge&logo=Jest&logoColor=white)

![](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)

# hackers-ec-be
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"seed:undo": "npx sequelize-cli db:seed:undo:all",
"test": "jest --no-cache --detectOpenHandles",
"test-test": "jest --watchAll --no-cache --detectOpenHandles",
"test:ci": "jest --detectOpenHandles --coverage"
"test:ci": "jest --detectOpenHandles --coverage --verbose"
},
"keywords": [],
"author": "",
Expand All @@ -35,7 +35,6 @@
"sequelize": "^6.37.3",
"uuid": "^9.0.0"
},

"transform": {
"^.+\\.(ts|tsx)?$": "ts-jest",
"^.+\\.(js|jsx)$": "babel-jest",
Expand All @@ -60,6 +59,9 @@
"json-summary",
"text",
"lcov"
],
"coveragePathIgnorePatterns": [
"/src/database/config/db.config.ts"
]
},
"devDependencies": {
Expand Down Expand Up @@ -87,4 +89,4 @@
"ts-node-dev": "^2.0.0",
"typescript": "^5.4.5"
}
}
}
2 changes: 2 additions & 0 deletions src/__test__/login.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ describe("LOGIN API TEST", () => {

it("should login successfully with correct credentials", async () => {
// Your test implementation goes here
const { body } = await request(app).get("")
console.log(body);
});
it("should return 401 for login with incorrect credentials", async () => {
// Your test implementation goes here
Expand Down
8 changes: 4 additions & 4 deletions src/__test__/product.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import app from "../app";
import request from "supertest";
import { connectionToDatabase } from "../database/config/db.config";
// import { connectionToDatabase } from "../database/config/db.config";

jest.setTimeout(30000);

describe("PRODUCT API TEST", () => {
beforeAll(async () => {
await connectionToDatabase();
});
// beforeAll(async () => {
// await connectionToDatabase();
// });

it("Seller should create a product", async () => {
// Your test implementation goes here
Expand Down
8 changes: 4 additions & 4 deletions src/__test__/users.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import app from "../app";
import request from "supertest";
import { connectionToDatabase } from "../database/config/db.config";
// import { connectionToDatabase } from "../database/config/db.config";

jest.setTimeout(30000);

describe("USER API TEST", () => {
beforeAll(async () => {
await connectionToDatabase();
});
// beforeAll(async () => {
// await connectionToDatabase();
// });

it("Should return 200 and list of all users", async () => {
// Your test implementation goes here
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "reflect-metadata";
import app from "./app";
import { PORT } from "./utils/keys";
import { connectionToDatabase } from "./database/config/db.config";
Expand Down

0 comments on commit 0252bf6

Please sign in to comment.