summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 73008da91ad3aebde9013a650311c0356f61315f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
image: buildstream/testsuite-debian:9-5da27168-32c47d1c

cache:
  key: "$CI_JOB_NAME-"
  paths:
    - cache/

stages:
  - test
  - post

variables:
  PYTEST_ADDOPTS: "--color=yes"
  INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache"
  COVERAGE_PREFIX: "${CI_JOB_NAME}."


#####################################################
#                    Test stage                     #
#####################################################

# Run premerge commits
#
.tests-template: &tests
  stage: test

  before_script:
  # Diagnostics
  - mount
  - df -h

  # Remove MANIFEST.in
  - rm MANIFEST.in

  script:
  - 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

normal-tests:
  <<: *tests

  variables:
    TEST_COMMAND: "tox -- --color=yes --integration"

skip-sdist:
  <<: *tests

  variables:
    TEST_COMMAND: "tox --develop -- --color=yes --integration"