Skip to content

Commit 58501f6

Browse files
Merge pull request complytime#815 from complytime/sandardize_sonarqube_ci
chore: CPLYTM-1359 sandardize sonarqube CI
2 parents dc8b429 + 2fa5f55 commit 58501f6

2 files changed

Lines changed: 47 additions & 58 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: SonarQube Analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: none
10+
issues: none
11+
pull-requests: none
12+
13+
jobs:
14+
generate-coverage:
15+
name: Generate Coverage Report
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
- name: Set up poetry and install
21+
uses: ./.github/actions/setup-poetry
22+
with:
23+
python-version: "3.9"
24+
- name: Run test
25+
run: make test-code-cov
26+
- name: Upload artifact
27+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
28+
with:
29+
name: coverage
30+
path: coverage.xml
31+
32+
sonarqube:
33+
name: SonarCloud Analysis
34+
permissions:
35+
contents: read
36+
pull-requests: read
37+
needs: generate-coverage
38+
uses: complytime/org-infra/.github/workflows/reusable_sonarqube.yml@main
39+
with:
40+
sonar_organization: ${{ vars.SONAR_ORGANIZATION }}
41+
sonar_project_key: ${{ vars.SONAR_PROJECT_KEY }}
42+
coverage_artifact_name: coverage
43+
coverage_file_path: coverage.xml
44+
language_scanner_property: sonar.python.coverage.reportPaths
45+
secrets:
46+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47+
source_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codecov.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)