Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

ci: add sonar cloud (#1197)

Wenzhao Hu1ad16facfdc4
diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml
index b7e61d1bb7..c1bc746a4c 100644
--- a/.github/workflows/check-pr.yml
+++ b/.github/workflows/check-pr.yml
@@ -12,7 +12,7 @@ permissions:
jobs:
validate:
- name: Validate PR title
+ name: validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml
index 26e124f223..725dea65cd 100644
--- a/.github/workflows/ci-lint.yml
+++ b/.github/workflows/ci-lint.yml
@@ -74,7 +74,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
- node-version: 18
+ node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
@@ -115,7 +115,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
- node-version: 18
+ node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
@@ -141,3 +141,19 @@ jobs:
- name: 🎨 Run Stylelint
run: pnpm run lint:style
+
+ sonar:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ # Disabling shallow clone is recommended for improving relevancy of reporting
+ fetch-depth: 0
+
+ - name: SonarCloud Scan
+ uses: SonarSource/[email protected]
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000000..22b659b632
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,3 @@
+sonar.organization=dream-num
+sonar.projectKey=dream-num_univer
+sonar.sources=.
\ No newline at end of file