contrib/heptapod-ci.yml
author Antoine Cezar <antoine.cezar@octobus.net>
Fri, 05 Jun 2020 09:01:35 +0200
changeset 45050 513b3ef277a3
parent 44977 aa568b6c6a10
child 45052 93e8e6e0b5fb
permissions -rw-r--r--
rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root` The println macro is not used to avoid string usage. Dealing only with bytes allows us to be compatible with any encoding and not just UTF8. Later on, format macro will be made to have more readable code. Differential Revision: https://phab.mercurial-scm.org/D8612
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/
44209
daf083140b5b heptapod-ci: fix test paths in the listing file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44204
diff changeset
     9
    - ls -1 tests/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:
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    17
        - 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
    18
        - echo "$RUNTEST_ARGS"
44204
b7760c2d33de heptapod-ci: run the test from outside the test directory
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44198
diff changeset
    19
        - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/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
    20
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    21
checks-py2:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    22
    <<: *runtests
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    23
    variables:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    24
        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
    25
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    26
checks-py3:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    27
    <<: *runtests
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
    28
    variables:
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    29
        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
    30
        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
    31
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
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
    33
    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
    34
        - 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
    35
        - 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
    36
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
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
    38
    <<: *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
    39
    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
    40
        PYTHON: python3
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    41
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    42
test-py2:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    43
    <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    44
    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
    45
        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
    46
        TEST_HGMODULEPOLICY: "c"
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    47
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    48
test-py3:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    49
    <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
    50
    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
    51
        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
    52
        PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    53
        TEST_HGMODULEPOLICY: "c"
44171
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    54
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    55
test-py2-pure:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    56
    <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    57
    variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    58
        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
    59
        TEST_HGMODULEPOLICY: "py"
44171
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    60
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    61
test-py3-pure:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    62
    <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    63
    variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
    64
        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
    65
        PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    66
        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
    67
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
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
    69
    <<: *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
    70
    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
    71
        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
    72
        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
    73
        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
    74
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
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
    76
    <<: *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
    77
    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
    78
        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
    79
        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
    80
        PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
    81
        TEST_HGMODULEPOLICY: "rust+c"
44977
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
    82
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
    83
test-py2-chg:
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
    84
    <<: *runtests
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
    85
    variables:
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
    86
        RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
    87
        TEST_HGMODULEPOLICY: "c"