Skip to content

Commit

Permalink
Setup custom sonar analizator
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed May 12, 2024
1 parent 2a4a960 commit 1489208
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,46 @@ on:
branches: [ "main" ]

jobs:
build-parcer:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'

- name: Build
- name: Build JSON Parser
working-directory: ./parser
run: GOOS=js GOARCH=wasm go build -v .

- name: Test
- name: Test JSON Parser
working-directory: ./parser
run: go test -v ./core/...

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'yarn'
- run: yarn install --immutable
- run: yarn lint
- run: yarn build:production
- run: yarn test

- name: Install dependencies
run: yarn install --immutable

- name: Lint
run: yarn lint

- name: Build
run: yarn build:production

- name: Test
run: yarn test

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 6 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sonar.projectKey=evg4b_modern-json-formatter
sonar.organization=evg4b
sonar.projectName=Modern JSON Formatter
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
sonar.sourceEncoding=UTF-8

0 comments on commit 1489208

Please sign in to comment.