-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.08 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: src
run: bun install
- name: Build
working-directory: src
run: bun run build
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: src
args: >
-Dsonar.organization=olibos
-Dsonar.projectKey=olibos_ha-addon-pluxee
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}