-
-
Notifications
You must be signed in to change notification settings - Fork 240
Coursework/sprint 3 implement and rewrite ci setup #841
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
Coursework/sprint 3 implement and rewrite ci setup #841
Conversation
- 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
|
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. |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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") { |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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); | ||
| }); |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback original file
|
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). |
Changelist
CI/CD Infrastructure