forked from FASP-QAT/fasp-core-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement changes for SDLC - CI pipeline and PR template #5
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
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5dc4b0f
ci: Configure CI pipeline to handle coverage reporting
e004acc
ci: align workflow naming conventions and add PR template
5465994
ci: align workflow naming conventions and add PR template
77ae976
ci: refine CI pipeline configuration
ac0e8a6
Moved the PR template
timler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| version: "2" | ||
| checks: | ||
| argument-count: | ||
| enabled: true | ||
| config: | ||
| threshold: 4 | ||
| complex-logic: | ||
| enabled: true | ||
| config: | ||
| threshold: 4 | ||
| file-lines: | ||
| enabled: true | ||
| config: | ||
| threshold: 250 # Maximum lines per file | ||
| method-complexity: | ||
| enabled: true | ||
| config: | ||
| threshold: 5 # Cyclomatic complexity threshold | ||
| method-count: | ||
| enabled: true | ||
| config: | ||
| threshold: 20 # Maximum methods per class/module | ||
| method-lines: | ||
| enabled: true | ||
| config: | ||
| threshold: 25 # Maximum lines per method | ||
| nested-control-flow: | ||
| enabled: true | ||
| config: | ||
| threshold: 4 # Maximum nesting depth | ||
| return-statements: | ||
| enabled: true | ||
| config: | ||
| threshold: 4 # Maximum return statements per function | ||
| similar-code: | ||
| enabled: true | ||
| identical-code: | ||
| enabled: true | ||
|
|
||
| exclude_patterns: | ||
| - "test/" | ||
| - "tests/" | ||
| - "**/test/" | ||
| - "**/tests/" | ||
| - "**/*.test.js" | ||
| - "**/*.test.jsx" | ||
| - "**/*.spec.js" | ||
| - "**/*.spec.jsx" | ||
| - "build/" | ||
| - "dist/" | ||
| - "node_modules/" | ||
| - "public/" | ||
| - "coverage/" | ||
| - "docs/" | ||
| - "*.md" | ||
| - ".github/" | ||
| - |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| ## Description | ||
| <!--A brief explanation of what was changed, why it was changed and how it was changed. --> | ||
|
|
||
| ## Type of change | ||
| <!-- Mark relevant items with 'x' --> | ||
| - [ ] New Feature | ||
| - [ ] Bug Fix | ||
| - [ ] Refactor | ||
| - [ ] Documentation Update | ||
| - [ ] Style | ||
| - [ ] Performance Improvements | ||
| - [ ] Test Update | ||
| - [ ] Build/CI Update | ||
|
|
||
| ## Testing | ||
| <!-- Describe how you tested these changes --> | ||
| - [ ] Unit Tests Added/Updated | ||
| - [ ] Integration Tests Added/Updated | ||
| - [ ] Manual Testing Completed | ||
| ### Test Cases | ||
| <!-- List key test scenarios --> | ||
| 1. | ||
| 2. | ||
|
|
||
| ## Deployment Instructions (optional) | ||
| <!-- Include instructions about any scripts that need to be run --> | ||
|
|
||
| ## QA Instructions (optional) | ||
| <!-- Include any information that will help a reviewer with testing --> | ||
|
|
||
| ## Breaking Changes | ||
| <!-- Mark with 'x' if applies --> | ||
| - [ ] This PR introduces breaking changes | ||
| <!-- If yes, describe the impact and migration path --> | ||
|
|
||
| ## Dependencies | ||
| <!-- List any new dependencies or changes to existing ones --> | ||
|
|
||
| ## Related Tickets & Documents | ||
| <!-- Include JIRA ticket references and their summary --> | ||
|
|
||
| ## Screenshots/Recordings | ||
| <!-- If applicable, add screenshots or recordings --> | ||
|
|
||
| ## Checklist | ||
| <!-- Mark completed items with 'x' --> | ||
| - [ ] Code follows style guidelines | ||
| - [ ] Self-review completed | ||
| - [ ] Tests pass locally | ||
| - [ ] Documentation updated | ||
| - [ ] No new warnings generated | ||
|
|
||
| ## Additional Notes | ||
| <!-- Any other relevant information --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Continuous Integration Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| paths-ignore: | ||
| - '**.md' | ||
| - '**.txt' | ||
| - '**.xml' | ||
| - '**.sql' | ||
| - '**.csv' | ||
| - '**.zip' | ||
| - 'docs/**' | ||
| - '.gitignore' | ||
| - 'LICENSE' | ||
|
|
||
| env: | ||
| NODE_VERSION: '16' | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: 'npm' | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ~/.npm | ||
| key: npm-${{ hashFiles('package-lock.json') }} | ||
| restore-keys: npm- | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci --legacy-peer-deps | ||
|
|
||
| - name: Run tests with coverage | ||
| run: | | ||
| mkdir -p coverage | ||
| mkdir -p coverage/.tmp | ||
| npm run test:coverage | ||
| echo "Test coverage complete, checking files:" | ||
| ls -la | ||
| echo "Coverage directory contents:" | ||
| ls -la coverage/ || echo "Coverage directory empty or not found" | ||
|
|
||
| - name: Setup Code Climate | ||
| run: | | ||
| curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
| chmod +x ./cc-test-reporter | ||
| ./cc-test-reporter before-build | ||
|
|
||
| - name: Run Code Climate Analysis | ||
| env: | ||
| CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
| run: | | ||
| COVERAGE_FILE=$(find . -type f -name "lcov.info" -not -path "./node_modules/*" 2>/dev/null || echo "") | ||
| if [ -n "$COVERAGE_FILE" ]; then | ||
| echo "Found coverage file at: $COVERAGE_FILE" | ||
| ./cc-test-reporter format-coverage "$COVERAGE_FILE" --input-type lcov | ||
| ./cc-test-reporter upload-coverage | ||
| else | ||
| echo "Error: lcov.info not found in project directory (excluding node_modules)" | ||
| echo "Current directory structure:" | ||
| ls -R | ||
| exit 1 | ||
| fi | ||
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
Oops, something went wrong.
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.
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.
This is what I added - AFAIK you don't need separate definition for pull_request because it's covered under push
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.
It makes sense, let me resolve that