Debian Codegraph @

.github/workflows/sonar.yml

raw
1 name: SonarCloud
2 on:
3 push:
4 branches:
5 - main
6 pull_request:
7 types: [opened, synchronize, reopened]
8 permissions: read-all
9 jobs:
10 build:
11 name: Analyze
12 if: github.repository == 'manugarg/pacparser' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
13 runs-on: ubuntu-latest
14 steps:
15 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16 with:
17 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
18 - name: Install bear
19 run: sudo apt install -y bear
20 - name: Generate compilation database
21 run: |
22 make -C src clean
23 bear -- make -C src
24 - name: SonarCloud Scan
25 uses: SonarSource/[email protected]
26 env:
27 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}