image: debian:stable stages: - linting - test - renovate - build_container pyflakes: stage: linting script: - apt-get -qqy update - apt-get -qqy install --no-install-recommends pyflakes3 - pyflakes3 ./main.py mypy: stage: linting script: - apt-get -qqy update - apt-get -qqy install --no-install-recommends python3-venv python3-pip - python3 -m venv .venv - source .venv/bin/activate - pip install mypy - pip install -r requirements-test.txt - mypy --ignore-missing-imports --explicit-package-bases matweb main.py bandit: image: name: $CI_REGISTRY/georg/mat2-ci-images:linting stage: linting script: - bandit -r ./matweb/ main.py tests:debian: stage: test before_script: - apt update script: - apt-get -qqy update - apt-get -qqy install --no-install-recommends build-essential libgirepository1.0-dev mat2 python3-venv python3-dev python3-pip python3-setuptools libcairo2-dev pkg-config - python3 -m venv .venv - source .venv/bin/activate - pip3 install -r requirements.txt -r requirements-test.txt - coverage run --branch --include ./main.py,matweb/*.py -m unittest discover -s test - coverage report -m - coverage xml coverage: '/TOTAL.*(\d\d%)/' artifacts: reports: coverage_report: coverage_format: cobertura path: coverage.xml build-docker: stage: build_container image: name: gcr.io/kaniko-project/executor:v1.23.2-debug entrypoint: [""] script: - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.production --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG only: - tags - master renovate: stage: renovate variables: RENOVATE_TOKEN: $GITLAB_API_TOKEN image: name: renovate/renovate:38 entrypoint: [''] script: - renovate --platform gitlab --endpoint ${CI_API_V4_URL} --token ${GITLAB_API_TOKEN} ${CI_PROJECT_PATH}