Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/counter/counter.test.display.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ try {
current = parseInt(content, 10) || 0;
}

console.info(`\n\nTests ran: ${current}\n\n`);
console.info(`\n\nTotal test runs: ${current}\n\n`);
} catch (err) {
console.error('Error updating counter:', err.message);
}
2 changes: 1 addition & 1 deletion .github/counter/counter.test.increment.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ try {

// Write back
fs.writeFileSync(filePath, String(updated));
console.info(`\n\nCounter updated: ${current} → ${updated}\n\n`);
console.info(`\n\nTest run counter updated: ${current} → ${updated}\n\n`);
} catch (err) {
console.error('Error updating counter:', err.message);
}
1 change: 0 additions & 1 deletion .github/scripts/check-coverage-thresholds.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ for (const key of ['branches', 'functions', 'lines', 'statements']) {
if (failed) {
const stars = '*'.repeat(warnMessage.length + 8);
execSync('clear', { stdio: 'inherit' });
console.log(warnMessage.length);
console.log('\n\nCongratulations! You have successfully run the coverage check and added tests.');
console.log('\n\nThe jest.config.js file is not insync with your new test additions.');
console.log('Please update the coverage thresholds in jest.config.js.');
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,30 @@ tests are run locally. The output is displayed.
The `.github` folder contains the following:

1. The test run "counter" scripts
2. The "counter" file
.github/counter
2. Script needed for the deployment process
.github/scripts
3. The github action work flow scripts
.github/workflows
4. The github PR templates
.github/pull_request_template.md

## Local pipeline

The local pipeline pipeline is managed via husky

1. The pre-commit requirements are:
- linting on the staged files passes
- .husky/pre-commit
2. The pre-push requirements are:
- All tests pass
- Test coverage is met

## Volta

OSF uses volta (https://volta.sh/) to manage node and npm versions inside of the repository

## Commitlint

OSF use commitlint (https://www.npmjs.com/package/commitlint) to standardize the commit messages.
Please review the commitlint conventions (@commitlint/config-conventional/README.md)
Loading