image: mambaorg/micromamba:1.4.3 before_script: - mkdir -p micromamba - export MAMBA_ROOT_PREFIX=micromamba - micromamba create -yf docs/environment.yml - eval "$(micromamba shell hook --shell bash)" - micromamba activate pymf-docs run tests: script: - pip install pytest-cov pytest-randomly pytest-repeat pytest-ruff pytest-regressions - py.test coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' artifacts: paths: - htmlcov reports: junit: junit.xml coverage_report: coverage_format: cobertura path: coverage.xml run profiler: script: - pip install memray pyinstrument - python profiling/graphene.py - memray stats memoryProfile.bin - memray summary memoryProfile.bin artifacts: paths: - timeProfile.html - memoryProfile.bin run docs: script: - make -C docs/ html SPHINXOPTS="-WT --keep-going -n" artifacts: paths: - docs/build pages: needs: - run tests - run profiler - run docs script: - mkdir public - cp -r htmlcov public/ - cp -r docs/build public/ - cp -r timeProfile.html public/ artifacts: paths: - public run pre-commit: variables: PRE_COMMIT_HOME: $CI_PROJECT_DIR/.pre-commit-cache script: - micromamba install -c conda-forge -y mamba pip pre-commit git - git config --global --add safe.directory $CI_PROJECT_DIR - pre-commit run --all-files cache: key: "$CI_JOB_NAME" paths: - .pre-commit-cache - micromamba