Skip to content

Commit

Permalink
ci: adjusted install steps
Browse files Browse the repository at this point in the history
  • Loading branch information
rH4rtinger committed Oct 9, 2024
1 parent 001a88c commit 680580c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ESLint

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:

permissions:
Expand All @@ -27,22 +27,21 @@ jobs:

- name: Install Coverage Reporters
run: npm install -g nyc
npm install -d mocha-multi-reporters
npm install -d mocha-junit-reporter
npm install -d mocha-sonarqube-reporter
- run: |
- name: Install Mocha reporters
run: npm install -d mocha-multi-reporters mocha-junit-reporter mocha-sonarqube-reporter
- name: create mocha config
run: |
echo '{
"reporterEnabled": "spec, mocha-junit-reporter, mocha-sonarqube-reporter"
}' > config.json
- name: Run tests with coverage
run: nyc --reporter lcovonly npm run test -- --reporter mocha-multi-reporters --reporter-options configFile=config.json


- name: Analyze with SonarCloud
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
# Additional arguments for the SonarScanner CLI
args:
Expand All @@ -51,7 +50,7 @@ jobs:
-Dsonar.projectKey=aditosoftware_driver-dependencies
-Dsonar.organization=aditosoftware
-Dsonar.eslint.reportPaths=eslint-results.json
-Dsonar.testExecutionReportPaths=xunit.xml
-Dsonar.testExecutionReportPaths=xunit.xml
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
# Comma-separated paths to directories containing main source files.
#-Dsonar.sources= # optional, default is project base directory
Expand All @@ -60,4 +59,4 @@ jobs:
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
#-Dsonar.verbose= # optional, default is false
# When you need the analysis to take place in a directory other than the one from which it was launched, default is .
projectBaseDir: .
projectBaseDir: .

0 comments on commit 680580c

Please sign in to comment.