support-organizer/.gitlab-ci.yml

47 lines
1.1 KiB
YAML

stages:
- quality assurance
- deploy
.init_venv: &init_venv
- python -m venv .venv
- source .venv/bin/activate
- python --version
- echo "venv '$VIRTUAL_ENV'"
.install_requirements: &install_requirements
- pip install -r requirements.txt --disable-pip-version-check -q
- python -m pip list --format=columns --disable-pip-version-check
backend-pylint:
stage: quality assurance
image: python:3.11.4-buster
before_script:
- mkdir -p public
- cd backend
- *init_venv
- *install_requirements
- pip install pylint pylint-gitlab --disable-pip-version-check -q
- pylint --version
- cd ..
script:
- pylint backend/src/* --rcfile=backend/.pylintrc --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter > codeclimate.json
- pylint backend/src/* --rcfile=backend/.pylintrc --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter > public/index.html
artifacts:
paths:
- public
reports:
codequality: codeclimate.json
when: always
pages:
stage: deploy
image: alpine:latest
script:
- echo "Deployed!"
artifacts:
paths:
- public
only:
refs:
- main