support-organizer/.gitlab-ci.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

2023-09-26 20:01:25 +00:00
stages:
- quality assurance
2023-10-01 20:27:16 +00:00
- deploy
2023-09-26 20:01:25 +00:00
2023-10-01 17:54:06 +00:00
.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
2023-09-26 20:54:40 +00:00
backend-pylint:
2023-09-26 20:01:25 +00:00
stage: quality assurance
image: python:3.11.4-buster
before_script:
2023-10-01 20:27:16 +00:00
- mkdir -p public
2023-09-26 20:01:25 +00:00
- cd backend
2023-10-01 17:54:06 +00:00
- *init_venv
- *install_requirements
2023-10-01 20:16:28 +00:00
- pip install pylint pylint-gitlab --disable-pip-version-check -q
2023-10-01 17:54:06 +00:00
- pylint --version
2023-10-01 20:30:11 +00:00
- cd ..
2023-09-26 20:01:25 +00:00
script:
2023-10-01 20:30:11 +00:00
- pylint backend/src/* --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter > codeclimate.json
- pylint backend/src/* --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter > public/index.html
2023-10-01 20:16:28 +00:00
artifacts:
paths:
- public
reports:
codequality: codeclimate.json
when: always
2023-10-01 20:27:16 +00:00
pages:
stage: deploy
image: alpine:latest
script:
- echo "Deployed!"
artifacts:
paths:
- public
only:
refs:
- main