-
Notifications
You must be signed in to change notification settings - Fork 382
55 lines (54 loc) · 1.82 KB
/
sonar.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
49
50
51
52
53
54
name: Sonar
on:
push:
branches:
- master
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update ubuntu
run: sudo apt update -y
- name: Install missing library
run: sudo apt-get install libnotify4 libsdl1.2debian libsdl2.2 -y
- name: Install xorg
run: sudo apt-get install -y xorg openbox
- name: Install Xvfb
run: sudo apt-get install xvfb -y
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install invoke and any other packages
run: pip install coverage invoke pytest
- name: Install wxPython
run: pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.0-cp310-cp310-linux_x86_64.whl
- name: Install RIDE dependencies
run: pip install -r requirements-dev.txt
- name: Run Xvfb
run: Xvfb :1 -noreset &
- name: Test Install RIDE
run: pip install .
- name: Run RIDE unit-tests
run: |
export DISPLAY=:1
invoke test-ci
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: ${{ github.workspace }}
args: >
-Dsonar.organization=helioguilherme66
-Dsonar.projectKey=HelioGuilherme66_RIDE
-Dsonar.python.coverage.reportPaths=.coverage-reports/coverage.xml
-Dsonar.sources=src/robotide
-Dsonar.tests=utest
-Dsonar.verbose=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
DISPLAY: :1