Skip to content

Commit ecba9c4

Browse files
committed
front end test coverage
1 parent 1c3e966 commit ecba9c4

1 file changed

Lines changed: 22 additions & 9 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
tags:
66
- v*
7-
branches:
8-
- develop
97
pull_request:
108

119
env:
@@ -42,16 +40,31 @@ jobs:
4240
with:
4341
fetch-depth: 0
4442

45-
- name: Build, Test, and Analyze
46-
env:
47-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
43+
- name: Start SonarQube Analysis
44+
run: |
45+
dotnet-sonarscanner begin \
46+
/k:"mlapaglia_OpenAlprWebhookProcessor" \
47+
/o:"openalprwebhookprocessor" \
48+
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
49+
/d:sonar.cs.opencover.reportsPaths="coverage/**/coverage.opencover.xml" \
50+
/d:sonar.javascript.lcov.reportPaths="**/lcov.info"
51+
52+
- name: Build and Test Backend
4853
run: |
49-
dotnet-sonarscanner begin /k:"mlapaglia_OpenAlprWebhookProcessor" /o:"openalprwebhookprocessor" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="coverage/**/coverage.opencover.xml"
5054
dotnet restore
51-
dotnet build --configuration Release --no-restore
52-
dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage;Format=opencover" --results-directory ./coverage
53-
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
55+
dotnet build --no-restore
56+
dotnet test --no-build --collect:"XPlat Code Coverage;Format=opencover" --results-directory ./coverage
57+
58+
- name: Build and Test Frontend
59+
working-directory: ./openalprwebhookprocessor.client
60+
run: |
61+
npm ci
62+
npm run test:prod
5463
64+
- name: End SonarQube Analysis
65+
run: |
66+
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
67+
5568
front-end-lint:
5669
runs-on: ubuntu-latest
5770
steps:

0 commit comments

Comments
 (0)