Skip to content

Commit

Permalink
Merge pull request #1 from Kreedzt/feature/sonar
Browse files Browse the repository at this point in the history
🔧 add sonar cloud ci
  • Loading branch information
Kreedzt authored May 23, 2024
2 parents 7b997df + 0d8e880 commit 78deb9a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: CI
on:
pull_request:
branches: [master]
push:
branches: [master]

permissions:
contents: read
Expand All @@ -14,12 +16,23 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

![license](https://badgen.net/github/license/Kreedzt/rwr-profile-server)
![latest release](https://badgen.net/github/release/Kreedzt/rwr-profile-server)
![commits count](https://badgen.net/github/commits/Kreedzt/rwr-profile-server)
![last commit](https://badgen.net/github/last-commit/Kreedzt/rwr-profile-server)
![rwr_version](https://badgen.net/badge/RWR/1.94/orange)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Kreedzt_rwr-profile-server&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Kreedzt_rwr-profile-server)
[![Docker Image Size](https://badgen.net/docker/size/zhaozisong0/rwr-profile-server?icon=docker&label=image%20size)](https://hub.docker.com/r/zhaozisong0/rwr-profile-server)
![rwr_version](https://badgen.net/badge/RWR/1.97/orange)

## 开发
> 该项目提供了前端界面, 可用前端界面来进行开发调试: https://github.com/Kreedzt/rwr-profile-web
Expand Down
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.projectKey=Kreedzt_rwr-profile-server
sonar.organization=kreedzt

0 comments on commit 78deb9a

Please sign in to comment.