Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced SonarCloud frontend reporting #351

Merged
merged 2 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
java-version: 12
- name: Checkout code
uses: actions/checkout@master
- name: Cache Maven artifacts
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Generate CHANGELOG.md
uses: charmixer/auto-changelog-action@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish-merges-to-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache Maven artifacts
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Setup build environment
uses: actions/setup-java@v1
with:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,26 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Cache Maven artifacts
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Setup build environment
uses: actions/setup-java@v1
with:
java-version: 12
- name: Build
run: mvn clean package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=comixed -Dsonar.projectKey=comixed_comixed -Dsonar.sources=./src -Dsonar.exclusions=**/*test*/** -Dsonar.test.inclusions=**/*test*/** -Pci
run: >
mvn clean package sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=comixed
-Dsonar.projectKey=comixed_comixed
-Dsonar.sources=./src
-Dsonar.exclusions=**/*test*/**
-Dsonar.test.inclusions=**/*test*/**
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Pci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion comixed-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"test": "ng test --code-coverage",
"lint": "ng lint",
"e2e": "ng e2e"
},
Expand Down
3 changes: 2 additions & 1 deletion comixed-frontend/src/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module.exports = function(config) {
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
fixWebpackSourcePaths: true,
dir: require('path').join(__dirname, '../coverage')
},
angularCli: {
environment: 'dev'
Expand Down