contrib/heptapod-ci.yml
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 06 Mar 2020 17:02:50 +0100
changeset 44502 b3991b72d9f1
parent 44198 4bd35d25903f
child 44586 f8427841c8fc
permissions -rw-r--r--
heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44166
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
image: octobus/ci-mercurial-core
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
# The runner made a clone as root.
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
# We make a new clone owned by user used to run the step.
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
before_script:
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
    - hg clone . /tmp/mercurial-ci/ --noupdate
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
    - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
    - cd /tmp/mercurial-ci/
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
     9
    - (cd tests; ls -1 test-check-*.*) > /tmp/check-tests.txt
44166
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    11
variables:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    12
    PYTHON: python
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    13
    TEST_HGMODULEPOLICY: "allow"
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    14
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    15
.runtests_template: &runtests
44166
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
    script:
8b1dd3f42396 heptapod-ci: add a basic file to be able to run tests with heptapod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
        - cd tests/
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    18
        - echo "python used, $PYTHON"
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    19
        - echo "$RUNTEST_ARGS"
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    20
        - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" run-tests.py --color=always $RUNTEST_ARGS
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    21
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    22
checks-py2:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    23
    <<: *runtests
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    24
    variables:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    25
        RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    26
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    27
checks-py3:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    28
    <<: *runtests
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    29
    variables:
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    30
        RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    31
        PYTHON: python3
44169
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    32
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    33
rust-cargo-test-py2: &rust_cargo_test
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    34
    script:
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    35
        - echo "python used, $PYTHON"
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    36
        - make rust-tests
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    37
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    38
rust-cargo-test-py3:
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    39
    <<: *rust_cargo_test
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    40
    variables:
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44168
diff changeset
    41
        PYTHON: python3
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    42
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    43
test-py2:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    44
    <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    45
    variables:
44502
b3991b72d9f1 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44198
diff changeset
    46
        RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    47
        TEST_HGMODULEPOLICY: "c"
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    48
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    49
test-py3:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    50
    <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    51
    variables:
44502
b3991b72d9f1 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44198
diff changeset
    52
        RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    53
        PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    54
        TEST_HGMODULEPOLICY: "c"
44171
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    55
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    56
test-py2-pure:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    57
    <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    58
    variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    59
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    60
        TEST_HGMODULEPOLICY: "py"
44171
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    61
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    62
test-py3-pure:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    63
    <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    64
    variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    65
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    66
        PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    67
        TEST_HGMODULEPOLICY: "py"
44172
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    68
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    69
test-py2-rust:
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    70
    <<: *runtests
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    71
    variables:
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    72
        HGWITHRUSTEXT: cpython
44502
b3991b72d9f1 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44198
diff changeset
    73
        RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    74
        TEST_HGMODULEPOLICY: "rust+c"
44172
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    75
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    76
test-py3-rust:
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    77
    <<: *runtests
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    78
    variables:
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    79
        HGWITHRUSTEXT: cpython
44502
b3991b72d9f1 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44198
diff changeset
    80
        RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
44172
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44171
diff changeset
    81
        PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    82
        TEST_HGMODULEPOLICY: "rust+c"