mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 04:59:21 +08:00
ci: 新增 Qodana、Sonar 扫描
This commit is contained in:
38
.github/workflows/deploy.yml
vendored
Normal file
38
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Analysis Code Quality
|
||||||
|
|
||||||
|
on:
|
||||||
|
# 推送时执行
|
||||||
|
push:
|
||||||
|
branches: [dev]
|
||||||
|
# 可手动执行
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Qodana 扫描
|
||||||
|
qodana-scan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
|
||||||
|
fetch-depth: 0 # a full history is required for pull request analysis
|
||||||
|
- name: Scan
|
||||||
|
uses: JetBrains/qodana-action@v2023.3
|
||||||
|
env:
|
||||||
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||||
|
# Sonar 扫描
|
||||||
|
sonar-scan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Scan
|
||||||
|
uses: SonarSource/sonarcloud-github-action@master
|
||||||
|
env:
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
@@ -4,7 +4,7 @@
|
|||||||
<img src="https://img.shields.io/badge/License-LGPL--3.0-blue.svg" alt="License" />
|
<img src="https://img.shields.io/badge/License-LGPL--3.0-blue.svg" alt="License" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/SNAPSHOT-v1.2.1-%23ff3f59.svg" alt="Release" />
|
<img src="https://img.shields.io/badge/SNAPSHOT-v1.3.0-%23ff3f59.svg" alt="Release" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
<a href="https://github.com/Charles7c/continew-starter" target="_blank">
|
||||||
<img src="https://img.shields.io/github/stars/Charles7c/continew-starter?style=social" alt="GitHub stars" />
|
<img src="https://img.shields.io/github/stars/Charles7c/continew-starter?style=social" alt="GitHub stars" />
|
||||||
|
Reference in New Issue
Block a user