generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 239
Refactor/implement rewrite coverage #858
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
Open
wheresdiasd
wants to merge
18
commits into
CodeYourFuture:main
Choose a base branch
from
wheresdiasd:refactor/implement-rewrite-coverage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor/implement rewrite coverage #858
wheresdiasd
wants to merge
18
commits into
CodeYourFuture:main
from
wheresdiasd:refactor/implement-rewrite-coverage
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
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). |
- 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
0cccc97 to
003b0ec
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The pull requests consist in adding coverage for the sprint-3 coursework "IMPLEMENT AND REWRITE".
When users open a PR with the pattern 'coursework/sprint-3-implement-and-rewrite from their forks, it should run the expected tests for the coursework scenarios in a way the Reviewer have a smooth perspective of the written test results.
In addition, introduces a shell script that compares the implementation with the test cases to see if their match in equality of test cases.