forked from OneSignal/OneSignal-Cordova-SDK
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
caf4d5a
commit 05e1bb3
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Run Unit Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main, development ] | ||
pull_request: | ||
branches: [ main, development ] | ||
|
||
jobs: | ||
test: | ||
name: Unit-Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run tests (with coverage) | ||
run: npm test -- --coverage --ci | ||
|
||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
SONAR_TOKEN: ${{ secrets. SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
package-lock.json | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Organization and project keys are displayed in the right sidebar of the project homepage | ||
sonar.organization=outsystemsrd | ||
sonar.projectKey=OutSystems_OneSignal-Cordova-SDK | ||
sonar.host.url=https://sonarcloud.io | ||
|
||
sonar.language=ts | ||
|
||
# Path is relative to the sonar-project.properties file. Defaults to . | ||
sonar.sources=src | ||
sonar.tests=test | ||
|
||
# Defining path to coverage file | ||
sonar.javascript.lcov.reportPaths=./coverage/lcov.info | ||
|
||
# Specify the TypeScript file suffixes | ||
sonar.typescript.file.suffixes=.ts,.tsx | ||
|
||
# Define TS lint | ||
sonar.typescript.tslint.reportPaths=tslint-report.json | ||
|
||
# Exclude directories | ||
sonar.exclusions=**/node_modules/**,**/*.spec.ts, **/*.java |