Skip to content

Commit 99c924a

Browse files
committed
Merge branch 'dev'
2 parents ad6b690 + a418939 commit 99c924a

9 files changed

+33931
-2340
lines changed

.codeclimate.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
version: "2"
2+
checks:
3+
argument-count:
4+
enabled: true
5+
config:
6+
threshold: 4
7+
complex-logic:
8+
enabled: true
9+
config:
10+
threshold: 4
11+
file-lines:
12+
enabled: true
13+
config:
14+
threshold: 250 # Maximum lines per file
15+
method-complexity:
16+
enabled: true
17+
config:
18+
threshold: 5 # Cyclomatic complexity threshold
19+
method-count:
20+
enabled: true
21+
config:
22+
threshold: 20 # Maximum methods per class/module
23+
method-lines:
24+
enabled: true
25+
config:
26+
threshold: 25 # Maximum lines per method
27+
nested-control-flow:
28+
enabled: true
29+
config:
30+
threshold: 4 # Maximum nesting depth
31+
return-statements:
32+
enabled: true
33+
config:
34+
threshold: 4 # Maximum return statements per function
35+
similar-code:
36+
enabled: true
37+
identical-code:
38+
enabled: true
39+
40+
exclude_patterns:
41+
- "test/"
42+
- "tests/"
43+
- "**/test/"
44+
- "**/tests/"
45+
- "**/*.test.js"
46+
- "**/*.test.jsx"
47+
- "**/*.spec.js"
48+
- "**/*.spec.jsx"
49+
- "build/"
50+
- "dist/"
51+
- "node_modules/"
52+
- "public/"
53+
- "coverage/"
54+
- "docs/"
55+
- "*.md"
56+
- ".github/"
57+
-

.github/pull_request_template.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Description
2+
<!--A brief explanation of what was changed, why it was changed and how it was changed. -->
3+
4+
## Type of change
5+
<!-- Mark relevant items with 'x' -->
6+
- [ ] New Feature
7+
- [ ] Bug Fix
8+
- [ ] Refactor
9+
- [ ] Documentation Update
10+
- [ ] Style
11+
- [ ] Performance Improvements
12+
- [ ] Test Update
13+
- [ ] Build/CI Update
14+
15+
## Testing
16+
<!-- Describe how you tested these changes -->
17+
- [ ] Unit Tests Added/Updated
18+
- [ ] Integration Tests Added/Updated
19+
- [ ] Manual Testing Completed
20+
### Test Cases
21+
<!-- List key test scenarios -->
22+
1.
23+
2.
24+
25+
## Deployment Instructions (optional)
26+
<!-- Include instructions about any scripts that need to be run -->
27+
28+
## QA Instructions (optional)
29+
<!-- Include any information that will help a reviewer with testing -->
30+
31+
## Breaking Changes
32+
<!-- Mark with 'x' if applies -->
33+
- [ ] This PR introduces breaking changes
34+
<!-- If yes, describe the impact and migration path -->
35+
36+
## Dependencies
37+
<!-- List any new dependencies or changes to existing ones -->
38+
39+
## Related Tickets & Documents
40+
<!-- Include JIRA ticket references and their summary -->
41+
42+
## Screenshots/Recordings
43+
<!-- If applicable, add screenshots or recordings -->
44+
45+
## Checklist
46+
<!-- Mark completed items with 'x' -->
47+
- [ ] Code follows style guidelines
48+
- [ ] Self-review completed
49+
- [ ] Tests pass locally
50+
- [ ] Documentation updated
51+
- [ ] No new warnings generated
52+
53+
## Additional Notes
54+
<!-- Any other relevant information -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Continuous Integration Pipeline
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
- '**.txt'
8+
- '**.xml'
9+
- '**.sql'
10+
- '**.csv'
11+
- '**.zip'
12+
- 'docs/**'
13+
- '.gitignore'
14+
- 'LICENSE'
15+
16+
env:
17+
NODE_VERSION: '16'
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ env.NODE_VERSION }}
31+
cache: 'npm'
32+
33+
- name: Cache dependencies
34+
uses: actions/cache@v3
35+
with:
36+
path: ~/.npm
37+
key: npm-${{ hashFiles('package-lock.json') }}
38+
restore-keys: npm-
39+
40+
- name: Install dependencies
41+
run: npm ci --legacy-peer-deps
42+
43+
- name: Run tests with coverage
44+
run: |
45+
mkdir -p coverage
46+
mkdir -p coverage/.tmp
47+
npm run test:coverage
48+
echo "Test coverage complete, checking files:"
49+
ls -la
50+
echo "Coverage directory contents:"
51+
ls -la coverage/ || echo "Coverage directory empty or not found"
52+
53+
- name: Setup Code Climate
54+
run: |
55+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
56+
chmod +x ./cc-test-reporter
57+
./cc-test-reporter before-build
58+
59+
- name: Run Code Climate Analysis
60+
env:
61+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
62+
run: |
63+
COVERAGE_FILE=$(find . -type f -name "lcov.info" -not -path "./node_modules/*" 2>/dev/null || echo "")
64+
if [ -n "$COVERAGE_FILE" ]; then
65+
echo "Found coverage file at: $COVERAGE_FILE"
66+
./cc-test-reporter format-coverage "$COVERAGE_FILE" --input-type lcov
67+
./cc-test-reporter upload-coverage
68+
else
69+
echo "Error: lcov.info not found in project directory (excluding node_modules)"
70+
echo "Current directory structure:"
71+
ls -R
72+
exit 1
73+
fi

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ node_modules/.cache
1616
node_modules/
1717
build/
1818
# End of https://www.gitignore.io/api/visualstudiocode
19-
/nbproject/private/
19+
/nbproject/private/
20+
coverage/
21+
/coverage/

0 commit comments

Comments
 (0)