mirror of
https://github.com/gavvvr/obsidian-imgur-plugin.git
synced 2026-07-22 05:10:27 +00:00
ci: perform sonar scan with CI
This commit is contained in:
parent
6cbea5d0bf
commit
bd2276e8ec
2 changed files with 18 additions and 2 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
|
@ -2,16 +2,26 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: "**"
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Test
|
||||
run: npm run test
|
||||
- name: SonarCloud Scan
|
||||
uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
|
|
|||
6
sonar-project.properties
Normal file
6
sonar-project.properties
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
sonar.projectKey=gavvvr_obsidian-imgur-plugin
|
||||
sonar.organization=gavvvr
|
||||
|
||||
sonar.sources=src
|
||||
sonar.tests=test
|
||||
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
|
||||
Loading…
Reference in a new issue