Skip to content
Open

Dev #35

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
d764e0a
Create sonar.yml
RADhaigude Aug 19, 2025
7769212
Update sonar.yml
RADhaigude Aug 19, 2025
7bac4a3
Create sonar.yml
RADhaigude Aug 19, 2025
42e5cee
Update sonar.yml
RADhaigude Aug 19, 2025
34787d8
Update sonar.yml
RADhaigude Aug 19, 2025
0b3d937
Update sonar.yml
RADhaigude Aug 19, 2025
ae623da
Update sonar.yml
RADhaigude Aug 19, 2025
4d4b0ad
Update 1sonar.yml
RADhaigude Aug 19, 2025
e6edb9c
Update sonar.yml
RADhaigude Aug 19, 2025
ba5293c
Update sonar.yml
RADhaigude Aug 19, 2025
daf3c67
Update sonar.yml
RADhaigude Aug 19, 2025
38c30c0
Update sonar.yml
RADhaigude Aug 19, 2025
33e9345
Update sonar.yml
RADhaigude Aug 19, 2025
7794c39
Update sonar.yml
RADhaigude Aug 19, 2025
a6805ee
Update sonar.yml
RADhaigude Aug 19, 2025
5bf8fb1
Update sonar.yml
RADhaigude Aug 19, 2025
f8d1009
Update sonar.yml
RADhaigude Aug 19, 2025
393fd2c
Update sonar.yml22
RADhaigude Aug 20, 2025
0075874
Update sonar.yml
RADhaigude Aug 20, 2025
01e4a46
Update 11sonar.yml
RADhaigude Aug 20, 2025
a339a50
Update sonar.yml
RADhaigude Aug 20, 2025
bbb6436
Update sonar.yml
RADhaigude Aug 22, 2025
26fa3d8
Update sonar.yml
RADhaigude Sep 2, 2025
41eb617
Update sonar.yml
RADhaigude Sep 2, 2025
207af77
Update sonar.yml
RADhaigude Sep 2, 2025
ad57505
Update sonar.yml
RADhaigude Sep 2, 2025
204fa1a
Update sonar.yml
RADhaigude Sep 2, 2025
4e2bfc2
Update sonar.yml
RADhaigude Sep 2, 2025
9b88bde
Update sonar.yml
RADhaigude Sep 2, 2025
3c155d5
Update sonar.yml
RADhaigude Sep 2, 2025
67297eb
Update sonar.yml
RADhaigude Sep 2, 2025
78c6531
Update sonar.yml
RADhaigude Sep 2, 2025
32035ee
Update sonar.yml
RADhaigude Sep 2, 2025
c05ee2d
Update sonar.yml
RADhaigude Sep 2, 2025
51ae811
Update sonar.yml
RADhaigude Sep 2, 2025
7f28927
Update sonar.yml
RADhaigude Sep 2, 2025
1462a30
Update sonar.yml
RADhaigude Sep 2, 2025
34e67d7
Update sonar.yml
RADhaigude Sep 2, 2025
6e07058
Update sonar.yml
RADhaigude Sep 3, 2025
59afb51
Update sonar.yml
RADhaigude Sep 3, 2025
9feb988
Update sonar.yml
RADhaigude Sep 3, 2025
de70ab5
Update sonar.yml
RADhaigude Sep 3, 2025
340616d
Update sonar.yml
RADhaigude Sep 3, 2025
f8ac9e9
Update sonar.yml
RADhaigude Sep 3, 2025
47473cb
Update sonar.yml
RADhaigude Sep 3, 2025
91e1f98
Update sonar.yml
RADhaigude Sep 3, 2025
85353ca
Update sonar.yml
RADhaigude Sep 3, 2025
30c9a83
Update sonar.yml
RADhaigude Sep 3, 2025
e70cdbe
Update sonar.yml
RADhaigude Sep 3, 2025
5d0d6d0
Update sonar.yml
RADhaigude Sep 3, 2025
09a7582
Update sonar.yml
RADhaigude Sep 3, 2025
e6942fd
Update sonar.yml
RADhaigude Sep 3, 2025
b160bd3
Update sonar.yml
RADhaigude Sep 3, 2025
53ea3d6
Update sonar.yml
RADhaigude Sep 3, 2025
461bb80
Update sonar.yml
RADhaigude Sep 3, 2025
ae8dac6
Update sonar.yml
RADhaigude Sep 3, 2025
6119f84
Create App.test.js
RADhaigude Sep 3, 2025
4789c86
Update sonar.yml
RADhaigude Sep 3, 2025
32385c2
Update sonar.yml
RADhaigude Sep 3, 2025
e1efb43
Update sonar.yml
RADhaigude Sep 3, 2025
f552df9
Update sonar.yml
RADhaigude Sep 3, 2025
a28186d
Update sonar.yml
RADhaigude Sep 3, 2025
2eefc9e
Merge branch 'dev' into RADhaigude-patch-4
RADhaigude Sep 3, 2025
f14e316
Merge pull request #3 from RADhaigude/RADhaigude-patch-4
RADhaigude Sep 3, 2025
4b2318b
Update sonar.yml
RADhaigude Sep 3, 2025
78f21b8
Update sonar.yml
RADhaigude Sep 3, 2025
5067721
Update sonar.yml
RADhaigude Sep 3, 2025
d972c9d
Update sonar.yml
RADhaigude Sep 3, 2025
45ab3c1
Updatteste sonar.yml
RADhaigude Sep 3, 2025
67f5a20
Update sonar.yml
RADhaigude Sep 3, 2025
72b7d74
Update sonar.yml
RADhaigude Sep 3, 2025
b977841
Update sonar.yml
RADhaigude Sep 4, 2025
79e8e2c
Update sonar.yml
RADhaigude Sep 4, 2025
9abb65a
Update sonar.yml
RADhaigude Sep 4, 2025
9f364b4
Update sonar.yml
RADhaigude Sep 4, 2025
ea403a6
Update sonar.yml
RADhaigude Sep 4, 2025
914dfe4
Update sonar.yml
RADhaigude Sep 4, 2025
5e2b28e
Update sonar.yml
RADhaigude Sep 4, 2025
537494b
Update sonar.yml
RADhaigude Sep 4, 2025
450fa01
Update sonar.yml
RADhaigude Sep 4, 2025
5105875
Update sonar.yml
RADhaigude Sep 4, 2025
e8de4f4
Update sonar.yml
RADhaigude Sep 4, 2025
c7a17da
Update sonar.yml
RADhaigude Sep 4, 2025
5fbc158
Update sonar.yml
RADhaigude Sep 4, 2025
bec134f
Update sonar.yml
RADhaigude Sep 4, 2025
040cdf1
Update sonar.yml
RADhaigude Sep 4, 2025
d18cd67
Update sonar.yml
RADhaigude Sep 4, 2025
445ae0e
Update sonar.yml
RADhaigude Sep 4, 2025
1cb3f67
Update sonar.yml
RADhaigude Sep 5, 2025
5bc6934
Update sonar.yml
RADhaigude Sep 5, 2025
beb29b3
Update sonar.yml
RADhaigude Sep 5, 2025
83d50a8
Update sonar.yml
RADhaigude Sep 5, 2025
9acaa45
Updatenew sonar.yml
RADhaigude Sep 5, 2025
1637a1a
Updatenew1 sonar.yml
RADhaigude Sep 5, 2025
c4e8f3f
Update sonar.yml
RADhaigude Sep 5, 2025
c1f8207
Update sonar.yml
RADhaigude Sep 5, 2025
209f012
Update sonar.yml
RADhaigude Sep 5, 2025
94de30b
Update sonar.yml
RADhaigude Sep 5, 2025
6de75b9
Update sonar.yml
RADhaigude Sep 5, 2025
aa0886f
Update sonar.yml
RADhaigude Sep 5, 2025
8dd0218
Update sonar.yml
RADhaigude Sep 5, 2025
a1dafce
Update sonar.yml
RADhaigude Sep 5, 2025
ddea7cc
Update1 sonar.yml
RADhaigude Sep 5, 2025
d2613dd
Update sonar.yml
RADhaigude Sep 5, 2025
d7283e4
Update and rename sonar.yml to new1sonar.yml
RADhaigude Sep 5, 2025
e380789
Update new1sonar.yml
RADhaigude Sep 5, 2025
9bf9439
Update new11sonar.yml
RADhaigude Sep 5, 2025
d074039
Update new18sonar.yml
RADhaigude Sep 5, 2025
c19a010
Update new19sonar.yml
RADhaigude Sep 5, 2025
744befa
Update new16sonar.yml
RADhaigude Sep 5, 2025
9a9cda2
Update new31sonar.yml
RADhaigude Sep 5, 2025
7eeac87
Update new166sonar.yml
RADhaigude Sep 5, 2025
eae7bec
Update new166sonar.yml
RADhaigude Sep 5, 2025
c17405d
Update new221sonar.yml
RADhaigude Sep 5, 2025
13133a8
Update new133sonar.yml
RADhaigude Sep 5, 2025
a100a9d
Update new1sonar.yml
RADhaigude Sep 5, 2025
7fa808d
Update new333sonar.yml
RADhaigude Sep 5, 2025
9f86b7c
Update new1sonar.yml
RADhaigude Sep 5, 2025
734b489
Update new1sonar.yml
RADhaigude Sep 5, 2025
2f6fbc2
Update new1sonar.yml
RADhaigude Sep 5, 2025
fd2e3e1
Update new1sonar.yml
RADhaigude Sep 5, 2025
63ea0aa
Update new1sonar.yml
RADhaigude Sep 5, 2025
255135f
Update new1sonar.yml
RADhaigude Sep 5, 2025
b5ca0b5
Update new1sonar.yml
RADhaigude Sep 5, 2025
6ac0b8f
Update new1sonar.yml
RADhaigude Sep 5, 2025
908819e
Update new1sonar.yml
RADhaigude Sep 5, 2025
3bff38f
Update new1sonar.yml
RADhaigude Sep 5, 2025
d6e337a
Update new1sonar.yml
RADhaigude Sep 5, 2025
7c1c1b8
Update new33sonar.yml
RADhaigude Sep 8, 2025
0076ba5
Update ne361sonar.yml
RADhaigude Sep 8, 2025
6548146
Update new1sonar.yml
RADhaigude Sep 8, 2025
a830ed9
Update new1sonar.yml
RADhaigude Sep 8, 2025
37bab2c
Update new1sonar.yml
RADhaigude Sep 8, 2025
aae29a8
Create TestPRComponent.jsx
RADhaigude Sep 9, 2025
b62e0f5
Update new1sonar.yml
RADhaigude Sep 9, 2025
545ed9f
Update new1sonar.yml
RADhaigude Sep 9, 2025
beda6d3
Update new1sonar.yml
RADhaigude Sep 9, 2025
4b085ed
Update new1sonar.yml
RADhaigude Sep 9, 2025
03141fd
Update new1sonar.yml
RADhaigude Sep 11, 2025
b241750
Update new21sonar.yml
RADhaigude Sep 11, 2025
90f28b0
Update new1sonar.yml
RADhaigude Sep 11, 2025
ecd27dd
Update new221sonar.yml
RADhaigude Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/new1sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: SonarCloud Scan

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest

steps:
# 1️⃣ Checkout repo
- name: Checkout code
uses: actions/checkout@v4

# 2️⃣ Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

# 3️⃣ Install dependencies
- name: Install dependencies
run: npm install

# 4️⃣ Run tests with coverage
- name: Run tests with coverage
run: npm test -- --coverage --watchAll=false

# 5️⃣ SonarCloud Scan
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed for PR decoration
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://sonarcloud.io"
with:
args: >
-Dsonar.projectKey=RADhaigude_invoice-generator-react
-Dsonar.organization=radhaigude
-Dsonar.sources=src
-Dsonar.exclusions=node_modules/**,coverage/**,build/**,dist/**
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.base=${{ github.base_ref }}
-Dsonar.verbose=true
97 changes: 97 additions & 0 deletions sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI / SonarCloud Scan

on:
push:
branches:
- dev
- master
pull_request:
branches:
- master # ✅ Only trigger PR checks into master (adjust if needed)

jobs:
sonarcloud:
runs-on: ubuntu-latest

steps:
# 1️⃣ Checkout code
- name: Checkout code
uses: actions/checkout@v4

# 2️⃣ Setup Node.js (React project)
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

# 3️⃣ Install dependencies
- name: Install dependencies
run: npm ci

# 4️⃣ Run SonarCloud Scan
- name: SonarCloud Scan (push)
if: github.event_name == 'push'
uses: SonarSource/sonarcloud-github-action@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=RADhaigude_invoice-generator-react
-Dsonar.organization=radhaigude
-Dsonar.sources=.
- name: SonarCloud Scan (PR)
if: github.event_name == 'pull_request'
uses: SonarSource/sonarcloud-github-action@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=RADhaigude_invoice-generator-react
-Dsonar.organization=radhaigude
-Dsonar.sources=.
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.base=${{ github.base_ref }}

# 5️⃣ Fetch Quality Gate JSON
- name: Fetch Quality Gate status
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
curl -s -u ${{ secrets.SONAR_TOKEN }}: \
"https://sonarcloud.io/api/qualitygates/project_status?projectKey=RADhaigude_invoice-generator-react&pullRequest=${{ github.event.pull_request.number }}" \
-o sonar_quality_gate.json
else
curl -s -u ${{ secrets.SONAR_TOKEN }}: \
"https://sonarcloud.io/api/qualitygates/project_status?projectKey=RADhaigude_invoice-generator-react" \
-o sonar_quality_gate.json
fi
cat sonar_quality_gate.json

# 6️⃣ Convert JSON to HTML
- name: Convert Quality Gate JSON to HTML
run: |
echo "<html><head><title>SonarCloud Quality Gate</title></head><body>" > sonar_quality_gate.html
echo "<h1>Quality Gate Status: $(jq -r '.projectStatus.status' sonar_quality_gate.json)</h1>" >> sonar_quality_gate.html
echo "<table border='1' cellpadding='5'><tr><th>Metric</th><th>Status</th><th>Actual Value</th><th>Error Threshold</th></tr>" >> sonar_quality_gate.html
jq -c '.projectStatus.conditions[]' sonar_quality_gate.json | while read row; do
METRIC=$(echo $row | jq -r '.metricKey')
STATUS=$(echo $row | jq -r '.status')
ACTUAL=$(echo $row | jq -r '.actualValue')
THRESHOLD=$(echo $row | jq -r '.errorThreshold')
echo "<tr><td>$METRIC</td><td>$STATUS</td><td>$ACTUAL</td><td>$THRESHOLD</td></tr>" >> sonar_quality_gate.html
done
echo "</table></body></html>" >> sonar_quality_gate.html

# 7️⃣ Upload JSON Artifact
- name: Upload JSON Quality Gate
uses: actions/upload-artifact@v4
with:
name: sonar-quality-gate-json
path: sonar_quality_gate.json

# 8️⃣ Upload HTML Artifact
- name: Upload HTML Quality Gate
uses: actions/upload-artifact@v4
with:
name: sonar-quality-gate-html
path: sonar_quality_gate.html
8 changes: 8 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders Invoice Generator header', () => {
render(<App />);
const headerElement = screen.getByText(/Invoice Generator/i);
expect(headerElement).toBeInTheDocument();
});
14 changes: 14 additions & 0 deletions src/components/TestPRComponent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// src/components/TestPRComponent.jsx

import React from 'react';

const TestPRComponent = () => {
return (
<div style={{ padding: '20px', border: '1px dashed #0076D7', margin: '10px' }}>
<h3>🚀 Test PR Component</h3>
<p>This component exists only for PR comparison. It does not affect the app.</p>
</div>
);
};

export default TestPRComponent;