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

Test scan #50

Merged
merged 29 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6e14916
test
yzlucas Sep 17, 2024
260ce5a
try use node version 18
yzlucas Sep 17, 2024
d02b368
trigger test
yzlucas Sep 17, 2024
b8c6520
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 17, 2024
c24b583
Remove package-lock.json
yzlucas Sep 17, 2024
6167dc9
Merge branch 'test-scan' of github.com:yzlucas/nr-bcws-wfprev into te…
yzlucas Sep 17, 2024
4752bd7
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 17, 2024
e62bd63
trigger test
yzlucas Sep 17, 2024
3ad3117
Update the browsers property to use ChromeHeadless instead of Chrome
yzlucas Sep 17, 2024
7869153
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 17, 2024
723eadd
trigger p
yzlucas Sep 17, 2024
29bf708
update unit test
yzlucas Sep 17, 2024
d6f1ef4
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 17, 2024
ae753b3
run unit test
yzlucas Sep 17, 2024
29d2408
missing fi
yzlucas Sep 17, 2024
928b338
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 17, 2024
51b1760
test scan
yzlucas Sep 17, 2024
2a6b5d4
change the path of converage-summary
yzlucas Sep 17, 2024
ad61655
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 17, 2024
8f549d4
teigger
yzlucas Sep 17, 2024
1329da1
print out the coverage-summary.json
yzlucas Sep 18, 2024
a5c46f3
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 18, 2024
b9a193f
trigger
yzlucas Sep 18, 2024
baa61ce
Merge branch 'test-scan' of github.com:yzlucas/nr-bcws-wfprev into te…
yzlucas Sep 18, 2024
22d3c32
update grep script
yzlucas Sep 18, 2024
e4c18ad
Merge branch 'bcgov:main' into test-scan
yzlucas Sep 18, 2024
03226c8
trigger
yzlucas Sep 18, 2024
ca0e96a
modify check code coverage part
yzlucas Sep 18, 2024
fda3a02
modify check code coverage part
yzlucas Sep 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests
name: Run Tests

env:
NPMRC: ${{ secrets.NPMRC }}
Expand Down Expand Up @@ -52,12 +52,16 @@ jobs:
working-directory: client/wfprev-war/src/main/angular

# Ensure coverage meets the required threshold
- name: Check code coverage
run: |
if grep -q '"statements":.*"pct": \([8-9][0-9]\|100\)' coverage/wfprev/coverage-summary.json; then
echo "Test passed";
else
echo "Code coverage is less than 80%! Exiting...";
exit 1;
fi
working-directory: client/wfprev-war/src/main/angular
- name: Check code coverage
run: |
# Extract the "pct" value for "statements" using jq
statements_pct=$(jq '.total.statements.pct' coverage/wfprev/coverage-summary.json)

# Check if the percentage is greater than or equal to 80
if (( $(echo "$statements_pct >= 80" | bc -l) )); then
echo "Test passed. Code coverage for statements is $statements_pct%";
else
echo "Code coverage for statements is less than 80%! Exiting... ($statements_pct%)";
exit 1;
fi
working-directory: client/wfprev-war/src/main/angular
Loading