-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 2.24 KB
/
sonar-qube-scann.yml
File metadata and controls
64 lines (54 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# name: sonarqube
# # ────────────────────────────────────────────────────────────────
# # CI TRIGGERS
# # · push on main → historical baseline
# # · pull_request PRs → quality gate before merge
# # ────────────────────────────────────────────────────────────────
# on:
# push:
# branches: [main]
# pull_request:
# types: [opened, synchronize, reopened]
# jobs:
# sonarQubeTrigger:
# name: Sonarqube Trigger
# runs-on: ubuntu-latest
# steps:
# # 1 — Checkout the repo
# - name: Checkout code
# uses: actions/checkout@v3
# # 2 — SSH agent for any Git-based pub dependencies
# - name: Start ssh-agent
# uses: webfactory/ssh-agent@v0.9.0
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# # 3 — Install Dart SDK
# - uses: dart-lang/setup-dart@v1
# # 4 — Install Flutter SDK
# - name: Set up Flutter
# uses: subosito/flutter-action@v2
# with:
# channel: stable
# flutter-version: 3.24.3
# # 5 — Install all pub packages (app + each module)
# - name: Get pub packages
# run: |
# set -e
# for dir in app modules/*; do
# if [ -f "$dir/pubspec.yaml" ]; then
# echo "▶ flutter pub get --directory $dir"
# flutter pub get --directory "$dir"
# fi
# done
# # 6 — Static analysis (kept exactly as before)
# - name: Analyze App
# run: flutter analyze
# # 7 — Install SonarScanner CLI (needed by full_coverage.py)
# - name: Setup Sonarqube Scanner
# uses: warchant/setup-sonar-scanner@v8
# # 8 — Run tests, build combined lcov.info and upload to SonarQube
# - name: Generate coverage & run SonarQube
# run: python3 coverage/full_coverage.py --ci
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_URL: ${{ secrets.SONAR_URL }}