Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ft codeclimate test #17

Closed
wants to merge 56 commits into from
Closed

Ft codeclimate test #17

wants to merge 56 commits into from

Conversation

GabrielDushime
Copy link
Collaborator

What does this PR do?
This PR integrates test coverage reporting into the project using CodeClimate and adds a coverage badge to the README file to display the current test coverage status.

Describe your changes
1.Added Coverage Reporting:

Installed the codeclimate-test-reporter package.
Configured Jest to generate lcov coverage reports.
Updated CircleCI configuration to run tests, generate coverage reports, and upload them to CodeClimate.
Configured Coverage Thresholds:

2.Enforced a minimum test coverage threshold in CodeClimate settings.
Added Coverage Badge to README:

3.Included a test coverage badge at the top of the README.md file.

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[x] Tests
[ ] Other

How should this be manually tested?

1.Check Test Coverage Reporting:

Push a commit to trigger the CircleCI build.
Verify that tests run and the coverage report is generated and uploaded to CodeClimate.

2.Check Coverage Badge:

Ensure the coverage badge in the README.md file reflects the current test coverage percentage.

What are the relevant pivotal tracker stories?

Pivotal Tracker Link

This comment was marked as duplicate.

Copy link
Collaborator

@kennyg37 kennyg37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to go

Copy link
Collaborator

@SHYAKA-Aime SHYAKA-Aime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good to me


/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: Unexpected token up


/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: Unexpected token up

@GabrielDushime GabrielDushime requested review from mutsinziisaac and SHYAKA-Aime and removed request for mugishaj092 and mutsinziisaac May 22, 2024 11:44
@@ -0,0 +1,11 @@
import { Sequelize, Dialect } from 'sequelize';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,40 @@
import { DataTypes, Model } from 'sequelize';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

db.sequelize = sequelize;
db.Sequelize = Sequelize;

module.exports = db;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'module' is not defined no-undef

);
})
.forEach(file => {
const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'__dirname' is not defined no-undef
'require' is not defined no-undef

}

fs
.readdirSync(__dirname)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'__dirname' is not defined no-undef

const process = require('process');
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../config/config.json')[env];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'__dirname' is not defined no-undef
'require' is not defined no-undef

const path = require('path');
const Sequelize = require('sequelize');
const process = require('process');
const basename = path.basename(__filename);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'__filename' is not defined no-undef

const fs = require('fs');
const path = require('path');
const Sequelize = require('sequelize');
const process = require('process');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined no-undef


const fs = require('fs');
const path = require('path');
const Sequelize = require('sequelize');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined no-undef

'use strict';

const fs = require('fs');
const path = require('path');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined no-undef

@@ -0,0 +1,43 @@
'use strict';

const fs = require('fs');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined no-undef

@GabrielDushime GabrielDushime deleted the ft-Codeclimate-test branch May 23, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants