Commit 143e218e authored by Konstantin Schulz's avatar Konstantin Schulz

combined CI for backend and frontend

parent d7f38415
Pipeline #11420 failed with stages
in 2 minutes and 31 seconds
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: '/.*/'
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
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment