Async_ORM_Postgresql_Wrapper/.gitlab-ci.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2021-10-06 06:10:33 -05:00
default:
2021-10-06 06:59:38 -05:00
image: python/python:3.9-alpine
2021-10-06 06:10:33 -05:00
before_script:
2021-10-06 06:28:03 -05:00
- apk add build-base
2021-10-06 06:22:35 -05:00
- apk add --no-cache postgresql-libs
- apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev
- python3.9 -m pip install -r requirements.txt
2021-10-06 06:22:35 -05:00
- apk --purge del .build-deps
2021-10-06 05:51:28 -05:00
stages: # List of stages for jobs, and their order of execution
- Build Wheel
2021-10-06 06:58:29 -05:00
- Test
2021-10-06 05:51:28 -05:00
pylint:
2021-10-06 06:49:52 -05:00
stage: Test
2021-10-06 06:56:53 -05:00
image: python:3.9-alpine
script:
2021-10-06 06:55:36 -05:00
- python3.9 -m pip install pylint pylint-exit anybadge
- mkdir ./pylint
- python3.9 -m pylint --output-format=text asyncdb | tee ./pylint/pylint.log || pylint-exit "${?}"
- PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log)
- anybadge --label=Pylint --file=pylint/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green
- echo "Pylint score is "${PYLINT_SCORE}"
artifacts:
paths:
- ./pylint/
build-job: # This job runs in the build stage, which runs first.
stage: Build Wheel
script:
- echo "Attempting to build distribution wheel"
- python -m build --wheel
2021-10-06 06:59:38 -05:00
- echo "Wheel successfully built!"