Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notifications-bot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
archives
notifications-bot
Commits
aace2ba2
Commit
aace2ba2
authored
Mar 22, 2023
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Exclude from coverage
parent
7fadd15d
Branches
Branches containing commit
No related tags found
2 merge requests
!38
Project/haven beta
,
!36
Update notifications bot to allow multiple identities & devices
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+4
-4
4 additions, 4 deletions
.gitlab-ci.yml
with
4 additions
and
4 deletions
.gitlab-ci.yml
+
4
−
4
View file @
aace2ba2
...
...
@@ -33,12 +33,12 @@ build:
# Test coverage
-
go-acc --covermode atomic --output testdata/coverage.out ./... -- -v
# Exclude cmd from test coverage as it is command line related tooling
#
- grep -v -e cmd testdata/coverage.out > testdata/coverage-real.out
-
go tool cover -func=testdata/coverage.out
-
go tool cover -html=testdata/coverage.out -o testdata/coverage.html
-
grep -v -e cmd
-e storage -e testutil
testdata/coverage.out > testdata/coverage-real.out
-
go tool cover -func=testdata/coverage
-real
.out
-
go tool cover -html=testdata/coverage
-real
.out -o testdata/coverage.html
# Test Coverage Check
-
go tool cover -func=testdata/coverage.out | grep "total:" | awk '{print $3}' | sed 's/\%//g' > testdata/coverage-percentage.txt
-
go tool cover -func=testdata/coverage
-real
.out | grep "total:" | awk '{print $3}' | sed 's/\%//g' > testdata/coverage-percentage.txt
-
export CODE_CHECK=$(echo "$(cat testdata/coverage-percentage.txt) >= $MIN_CODE_COVERAGE" | bc -l)
-
(if [ "$CODE_CHECK" == "1" ]; then echo "Minimum coverage of $MIN_CODE_COVERAGE succeeded"; else echo "Minimum coverage of $MIN_CODE_COVERAGE failed"; exit 1; fi);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment