Skip to content

Conversation

@wheresdiasd
Copy link

@wheresdiasd wheresdiasd commented Nov 3, 2025

Changelist

CI/CD Infrastructure

  • New GitHub Actions workflow for automated test coverage reporting (.github/workflows/test-coverage.yml:1)
  • Integrated inline assertion tests validation in CI pipeline
  • Configured Jest coverage with 40% code coverage and 100% function coverage thresholds
  • Set up ArtiomTr jest-coverage-report-action for PR coverage comments
  • Added test execution script with inline test parity verification (scripts/run-inline-tests.sh:1)
  • Created separate Jest config for automated testing (jest.config.jest-tests.js:1)
  • It only triggers for specific exercise.

i786m and others added 18 commits October 17, 2025 14:44
- Add Jest coverage configuration with 100% threshold
- Create inline test verification script that:
  - Runs inline assertion tests with Node.js
  - Detects console.assert failures
  - Verifies test parity between inline and Jest tests
  - Reports disparities in both directions
- Add GitHub Actions workflow that:
  - Triggers on coursework/sprint-3-implement-and-rewrite* branches
  - Runs inline tests with parity check
  - Runs Jest tests with coverage
  - Generates coverage report on PRs
- Set branches, lines, statements to 40%
- Keep functions at 100% to ensure every function is tested
- More practical for educational purposes while ensuring core functionality is covered
- Remove ArtiomTr/jest-coverage-report-action (was failing)
- Add simple coverage summary to GitHub Actions summary
- Upload coverage artifacts with if: always() to ensure they're saved even on failure
- Add inline test results table to summary (passed/failed counts)
- Add test parity comparison table showing mismatches
- Generate HTML coverage reports for download
- Parse and display coverage metrics in summary with threshold checks
- Visual status indicators (✅/❌) for all metrics
- Clear instructions to download HTML coverage report artifact
- Replace custom parsing with maintained jest-coverage-comment action
- Displays coverage badge, summary table, and file-by-file coverage
- Shows in both PR comments and GitHub Actions summary
- More reliable than manual JSON parsing
- Add peaceiris/actions-gh-pages to deploy HTML reports
- Coverage reports accessible at github.io URL per branch
- Add coverage report link to GitHub Actions summary
- No need to download artifacts, view directly in browser
- Remove GitHub Pages deployment
- Remove MishaKav/jest-coverage-comment
- Let ArtiomTr action run tests and generate coverage itself
- Simpler workflow with just inline tests + ArtiomTr coverage report
- Run Jest with required flags: --coverage --ci --json --testLocationInResults --outputFile=report.json
- Pass report.json to ArtiomTr action via coverage-file parameter
- Matches the documented example from ArtiomTr/jest-coverage-report-action
- Add pull-requests: write permission to allow action to comment on PRs
- ArtiomTr action will now automatically post coverage reports as PR comments
- Comments will include coverage summary and file-by-file breakdown
- Remove pull-requests: write permission
- Coverage report will only show in GitHub Actions Summary
- Avoids permission issues when forking to upstream repos
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

if (angle === 90) {
return "Right angle";
}
// Run the tests, work out what Case 2 is testing, and implement the required code here.
Copy link
Author

Choose a reason for hiding this comment

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

Rollback roiginal file

// write one test at a time, and make it pass, build your solution up methodically

function isProperFraction(numerator, denominator) {
if (numerator < denominator) {
Copy link
Author

Choose a reason for hiding this comment

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

Rollback original file

// write one test at a time, and make it pass, build your solution up methodically
// just make one change at a time -- don't rush -- programmers are deep and careful thinkers
function getCardValue(card) {
if (rank === "A") {
Copy link
Author

Choose a reason for hiding this comment

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

Rollback original file

// REPLACE the comments with the tests
// make your test descriptions as clear and readable as possible

// Case 2: Identify Acute Angles:
Copy link
Author

Choose a reason for hiding this comment

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

Rollback original file


test("should return true for a proper fraction", () => {
expect(isProperFraction(2, 3)).toEqual(true);
});
Copy link
Author

Choose a reason for hiding this comment

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

Rollback original file

expect(aceofSpades).toEqual(11);
});

// Case 2: Handle Number Cards (2-10):
Copy link
Author

Choose a reason for hiding this comment

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

Rollback original file

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@wheresdiasd wheresdiasd closed this Nov 8, 2025
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.

2 participants