3838
3939 # Wait for services
4040 - name : Wait for services
41- run : sleep
41+ run : sleep 5000
4242
43- # install dependencies
43+ # install backend dependencies
4444 - name : Install dependencies
4545 run : pip install -r requirements.txt
4646 working-directory : backend
@@ -58,31 +58,23 @@ jobs:
5858 python backend/notes_crud_service/app.py &
5959 wait
6060
61-
62- test-and-coverage :
63- timeout-minutes : 60
64- runs-on : ubuntu-latest
65- steps :
66- # 1. Checkout code
67- - uses : actions/checkout@v4
68-
69- # 2. Set up Node
61+ # Set up Node
7062 - name : Set up Node.js
7163 uses : actions/setup-node@v4
7264 with :
7365 node-version : lts/*
7466
75- # 3. Install dependencies
67+ # Install frontend dependencies
7668 - name : Install dependencies
7769 run : npm ci
7870 working-directory : frontend
7971
80- # 4. Build app (with coverage instrumentation)
72+ # Build app (with coverage instrumentation)
8173 - name : Build React app with coverage
8274 run : npm run build
8375 working-directory : frontend
8476
85- # 5. Start the app in background
77+ # Start the app in background
8678 - name : Start React app
8779 run : npm run start &
8880 working-directory : frontend
@@ -91,26 +83,20 @@ jobs:
9183 run : npx wait-on http://localhost:5173
9284 working-directory : frontend
9385
94- # 6. Run Playwright tests
86+ # Run Playwright tests
9587 - name : Run Playwright tests
9688 run : npm run test:e2e-coverage
9789 working-directory : frontend
9890
99- # 7. Upload coverage as artifact (optional)
91+ # Upload coverage as artifact
10092 - name : Upload coverage artifact
101- uses : actions/upload-artifact@v3
93+ uses : actions/upload-artifact@v4
10294 with :
10395 name : coverage
10496 path : frontend/coverage/
10597
106-
107- # 8. SonarQube Analysis
108- - name : Run SonarQube Scanner
109- uses : sonarsource/sonarcloud-github-action@v2
110- with :
111- projectKey : NavodPeiris_NoteMaker
112- organization : navodpeiris
113- token : ${{ secrets.SONAR_TOKEN }}
114- extraProperties : |
115- sonar.javascript.lcov.reportPaths=frontend/coverage/lcov.info
116- sonar.sources=frontend/src
98+ # SonarQube Analysis
99+ - name : SonarQube Scan
100+ uses : SonarSource/sonarqube-scan-action@v5
101+ env :
102+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
0 commit comments