generated from ThalesGroup/template-project
-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (45 loc) · 1.43 KB
/
sonarcloud.yml
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
name: SonarCloud analysis
on:
push:
branches:
- '**'
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch: null
permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Maven Action
uses: s4u/[email protected]
with:
checkout-fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip # caching pip dependencies
- name: install pytest
run: |
pip install pytest
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build and analyze
uses: coactions/setup-xvfb@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
run: |
mvn -P sonar -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=ThalesGroup_xsmp-modeler-core
./gradlew build vscodeExtension