diff --git a/.github/counter/counter.test.display.js b/.github/counter/counter.test.display.js index 82e419e2f..211e45a8a 100644 --- a/.github/counter/counter.test.display.js +++ b/.github/counter/counter.test.display.js @@ -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); } diff --git a/.github/counter/counter.test.increment.js b/.github/counter/counter.test.increment.js index fc96bd95b..6685a236b 100644 --- a/.github/counter/counter.test.increment.js +++ b/.github/counter/counter.test.increment.js @@ -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); } diff --git a/.github/scripts/check-coverage-thresholds.js b/.github/scripts/check-coverage-thresholds.js index 3847bafd5..6eb7a39e7 100644 --- a/.github/scripts/check-coverage-thresholds.js +++ b/.github/scripts/check-coverage-thresholds.js @@ -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.'); diff --git a/README.md b/README.md index c7b0ec463..fdfe192a5 100644 --- a/README.md +++ b/README.md @@ -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)