stages: - check - build - deploy format: stage: check image: python before_script: - pip install yapf autoflake script: - ./format.sh --check typecheck: stage: check image: python before_script: - pip install mypy script: - ./typecheck.sh --non-interactive --junit-xml mypy-report.xml artifacts: reports: junit: mypy-report.xml pytest: stage: check image: archlinux before_script: - pacman -Sy --noconfirm --needed archlinux-keyring && pacman -Su --noconfirm python python-pip sudo git base-devel arch-install-scripts rsync - pip install -r test_requirements.txt -r requirements.txt - 'echo "kupfer ALL = (ALL) NOPASSWD: ALL" > /etc/sudoers.d/kupfer_all' - useradd -m kupfer - chmod 777 . script: - script -e -c 'su kupfer -s /bin/bash -c "INTEGRATION_TESTS_USE_GLOBAL_CONFIG=TRUE KUPFERBOOTSTRAP_WRAPPED=DOCKER ./pytest.sh --junit-xml=pytest-report.xml --cov-report=xml:coverage.xml integration_tests.py"' coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' artifacts: reports: junit: pytest-report.xml coverage_report: coverage_format: cobertura path: coverage.xml build_docker: stage: build image: docker:latest services: ['docker:dind'] before_script: - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY" script: - docker build --pull -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}" -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}" . - if [[ "$CI_COMMIT_REF_NAME" == "main" ]]; then docker image tag "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}" "${CI_REGISTRY_IMAGE}:latest"; fi - docker push -a "${CI_REGISTRY_IMAGE}" only: - main - dev .docs: image: "${CI_REGISTRY_IMAGE}:dev" before_script: - pip install -r docs/requirements.txt script: - (cd docs && make) - mv docs/html public artifacts: paths: - public build_docs: stage: build extends: .docs except: - main pages: stage: deploy extends: .docs only: - main