| stages: |
| - test |
| |
| variables: |
| # SAST related variables |
| SAST_DISABLE_DIND: "true" |
| SAST_GOSEC_LEVEL: 2 |
| CI_PROJECT_REPOSITORY_LANGUAGES: "python" |
| |
| # Our own variables |
| # Version of the docker images we should use for all the images. |
| # This is taken from buildstream/buildstream-docker-images |
| DOCKER_IMAGE_VERSION: master-105004115 |
| PYTEST_ADDOPTS: "--color=yes" |
| INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache" |
| PYTEST_ARGS: "--color=yes --integration -n 2" |
| TEST_COMMAND: "tox -e py38-nocover --develop -- ${PYTEST_ARGS}" |
| COVERAGE_PREFIX: "${CI_JOB_NAME}." |
| |
| |
| ##################################################### |
| # Test stage # |
| ##################################################### |
| |
| # Run premerge commits |
| # |
| .tests-template: &tests |
| stage: test |
| |
| before_script: |
| # Diagnostics |
| - mount |
| - df -h |
| - tox --version |
| |
| script: |
| - mkdir -p "${INTEGRATION_CACHE}" |
| - useradd -Um buildstream |
| - chown -R buildstream:buildstream . |
| |
| # Run the tests as a simple user to test for permission issues |
| - su buildstream -c "${TEST_COMMAND}" |
| |
| after_script: |
| except: |
| - schedules |
| artifacts: |
| paths: |
| - .coverage-reports |
| |
| tests-py38: |
| image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.8-buster-${DOCKER_IMAGE_VERSION} |
| <<: *tests |