Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
callidus
Machina Callida
Commits
143e218e
Commit
143e218e
authored
Apr 30, 2020
by
Konstantin Schulz
Browse files
combined CI for backend and frontend
parent
d7f38415
Pipeline
#11420
failed with stages
in 2 minutes and 31 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
143e218e
stages
:
-
build
-
ci
_frontend
-
coverage
_frontend
-
ci
-
coverage
build
:
stage
:
build
script
:
-
docker-compose build
ci_frontend
:
stage
:
ci
_frontend
stage
:
ci
script
:
-
./ci.sh
-
cat ci_frontend.log
-
./ci_frontend.sh
artifacts
:
paths
:
-
ci_frontend.log
ci_backend
:
stage
:
ci
script
:
-
./ci_backend.sh
artifacts
:
paths
:
-
ci_backend.log
coverage
:
stage
:
coverage
script
:
-
./coverage.sh
-
cat coverage.log
artifacts
:
paths
:
-
coverage.log
coverage
:
'
/Statements.*?(\d+(?:\.\d+)?)%/'
#coverage_frontend:
# stage: coverage_frontend
# script:
# - ./coverage.sh
# - cat coverage_frontend.log
# artifacts:
# paths:
# - coverage_frontend.log
# coverage: '/.*/'
ci_backend.sh
0 → 100755
View file @
143e218e
docker-compose run
--rm
mcserver bash
-c
"source ../venv/bin/activate && coverage run --rcfile=.coveragerc tests.py && coverage combine && coverage report -m"
>
ci_backend.log
ci.sh
→
ci
_frontend
.sh
View file @
143e218e
File moved
coverage.sh
View file @
143e218e
sed
-En
's@Statements.*: @@p'
./ci_frontend.log |
sed
-n
's@%.*@@p'
>
coverage_frontend.log
x
=
$(
sed
-En
's@.*Statements.*: @@p'
./ci_frontend.log |
sed
-n
's@%.*@@p'
)
y
=
$(
sed
-En
's@TOTAL *[0-9]+ *[0-9]+ *@@p'
./ci_backend.log |
sed
-n
's@%.*@@p'
)
z
=
$(
echo
"scale=2; (
$x
+
$y
) / 2"
| bc
-l
)
echo
"Statements :
${
z
}
%"
>
coverage.log
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment