-
Notifications
You must be signed in to change notification settings - Fork 17
79 lines (70 loc) · 2.7 KB
/
branch-check.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: branch-check
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.x']
steps:
- name: Checkout
uses: actions/checkout@v4
id: checkout
- name: Setup
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Dependencies
run: pip install -r dev-requirements.txt
- name: Test
run: make coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: github.event_name == 'pull_request' && matrix.python == '3.x' && github.event.pull_request.head.repo.full_name != github.repository
with:
args: >
-Dsonar.projectVersion=${{ env.VERSION }}
-Dsonar.pullrequest.key=${{ github.event.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.organization=kronenthaler
-Dsonar.projectKey=kronenthaler_openstep-parser
-Dsonar.projectName=openstep-parser
-Dsonar.python.version=3
-Dsonar.python.coverage.reportPaths=tests/coverage.xml
-Dsonar.sources=openstep_parser/
-Dsonar.tests=tests/
-Dsonar.verbose=true
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: github.event_name == 'push' && matrix.python == '3.x' && github.event.pull_request.head.repo.full_name != github.repository
with:
args: >
-Dsonar.projectVersion=${{ env.VERSION }}
-Dsonar.branch.name=${{ github.ref_name }}
-Dsonar.organization=kronenthaler
-Dsonar.projectKey=kronenthaler_openstep-parser
-Dsonar.projectName=openstep-parser
-Dsonar.python.version=3
-Dsonar.python.coverage.reportPaths=tests/coverage.xml
-Dsonar.sources=openstep_parser/
-Dsonar.tests=tests/
-Dsonar.verbose=true
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}