Skip to content

Commit 9792096

Browse files
committed
reorder code coverage in GHA
1 parent 29a4f23 commit 9792096

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

.github/workflows/aps-cypress-e2e.yaml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,32 @@ jobs:
8787
name: code-coverage
8888
path: ${{ github.workspace }}/e2e/coverage
8989

90+
- name: Instrument the code for coverage analysis
91+
if: always()
92+
run: |
93+
# Rewrite the paths as the coverage starts with '../app'!
94+
sed -e 's/..\/app/./g' ./e2e/coverage/lcov.info > lcov.info
95+
96+
#cd src
97+
#npm install --legacy-peer-deps
98+
#npx nyc instrument --compact=false . --in-place
99+
100+
- name: SonarCloud Scan
101+
if: always()
102+
uses: sonarsource/sonarqube-scan-action@master
103+
with:
104+
args: >
105+
-Dsonar.organization=bcgov-oss
106+
-Dsonar.projectKey=aps-portal-e2e
107+
-Dsonar.host.url=https://sonarcloud.io
108+
-Dsonar.projectBaseDir=src
109+
-Dsonar.sources=.
110+
-Dsonar.exclusions=nextapp/**,mocks/**,test/**,tools/**,*.json,*.js
111+
-Dsonar.javascript.lcov.reportPaths=/github/workspace/lcov.info
112+
env:
113+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
115+
90116
- name: Upload Astra scan results
91117
uses: actions/upload-artifact@v4
92118
with:
@@ -116,30 +142,6 @@ jobs:
116142
exit 1
117143
fi
118144
119-
- name: Instrument the code for coverage analysis
120-
run: |
121-
# Rewrite the paths as the coverage starts with '../app'!
122-
sed -e 's/..\/app/./g' ./e2e/coverage/lcov.info > lcov.info
123-
124-
#cd src
125-
#npm install --legacy-peer-deps
126-
#npx nyc instrument --compact=false . --in-place
127-
128-
- name: SonarCloud Scan
129-
uses: sonarsource/sonarqube-scan-action@master
130-
with:
131-
args: >
132-
-Dsonar.organization=bcgov-oss
133-
-Dsonar.projectKey=aps-portal-e2e
134-
-Dsonar.host.url=https://sonarcloud.io
135-
-Dsonar.projectBaseDir=src
136-
-Dsonar.sources=.
137-
-Dsonar.exclusions=nextapp/**,mocks/**,test/**,tools/**,*.json,*.js
138-
-Dsonar.javascript.lcov.reportPaths=/github/workspace/lcov.info
139-
env:
140-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
142-
143145
- name: Set up Python 3.9
144146
if: failure()
145147
uses: actions/setup-python@v2

gwa-api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit eed2c5196cbc8b5a3aafe4d549cdd26d4247e947

0 commit comments

Comments
 (0)