contrib/heptapod-ci.yml
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 07 Dec 2021 14:11:58 -0800
changeset 48508 fa159bb463e6
parent 48404 0ad593b60760
child 48524 6bd42f9bc97e
permissions -rw-r--r--
simplemerge: avoid a call to `pycompat.strkwargs()` Differential Revision: https://phab.mercurial-scm.org/D11886
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45959
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45897
diff changeset
     1
stages:
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45897
diff changeset
     2
  - tests
45991
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45965
diff changeset
     3
  - phabricator
45959
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45897
diff changeset
     4
46323
723d241543b0 heptapod-ci: allow testing with docker image other than :latest
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46256
diff changeset
     5
image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
44249
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
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
     7
variables:
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
     8
    PYTHON: python
44430
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44255
diff changeset
     9
    TEST_HGMODULEPOLICY: "allow"
46401
2aef69e8efbb heptapod-ci: add a default value for HG_CI_IMAGE_TAG
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46323
diff changeset
    10
    HG_CI_IMAGE_TAG: "latest"
46676
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46426
diff changeset
    11
    TEST_HGTESTS_ALLOW_NETIO: "0"
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
    12
47825
f6879956a386 ci: add a "all" template to easily control "when" test run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47810
diff changeset
    13
.all_template: &all
f6879956a386 ci: add a "all" template to easily control "when" test run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47810
diff changeset
    14
  when: always
f6879956a386 ci: add a "all" template to easily control "when" test run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47810
diff changeset
    15
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
    16
.runtests_template: &runtests
47825
f6879956a386 ci: add a "all" template to easily control "when" test run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47810
diff changeset
    17
    <<: *all
45959
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45897
diff changeset
    18
    stage: tests
46244
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    19
    # The runner made a clone as root.
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    20
    # We make a new clone owned by user used to run the step.
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    21
    before_script:
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    22
      - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    23
      - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    24
      - cd /tmp/mercurial-ci/
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46146
diff changeset
    25
      - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
46402
6b0dac9f650a heptapod-ci: indicate which version of black is used for the run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46401
diff changeset
    26
      - black --version
46404
a390c7fcd286 heptapod-ci: indicate which version of clang-format is used for the run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46402
diff changeset
    27
      - clang-format --version
44249
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
    28
    script:
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
    29
        - echo "python used, $PYTHON"
44253
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44252
diff changeset
    30
        - echo "$RUNTEST_ARGS"
46676
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46426
diff changeset
    31
        - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
    32
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    33
checks-py2:
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
    34
    <<: *runtests
44253
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44252
diff changeset
    35
    variables:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44252
diff changeset
    36
        RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
44251
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44250
diff changeset
    37
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    38
checks-py3:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    39
    <<: *runtests
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    40
    variables:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    41
        RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    42
        PYTHON: python3
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    43
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    44
rust-cargo-test-py2: &rust_cargo_test
47825
f6879956a386 ci: add a "all" template to easily control "when" test run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47810
diff changeset
    45
    <<: *all
45959
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45897
diff changeset
    46
    stage: tests
44252
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44251
diff changeset
    47
    script:
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    48
        - echo "python used, $PYTHON"
44252
5fd43c788943 heptapod-ci: also run the dedicated rust test for the rust code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44251
diff changeset
    49
        - 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: 44251
diff changeset
    50
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    51
rust-cargo-test-py3:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    52
    stage: tests
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    53
    <<: *rust_cargo_test
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    54
    variables:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    55
        PYTHON: python3
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    56
45991
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45965
diff changeset
    57
phabricator-refresh:
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45965
diff changeset
    58
    stage: phabricator
46979
66cc5f867ddc phab-refresh: extract the comment in a variable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46755
diff changeset
    59
    variables:
66cc5f867ddc phab-refresh: extract the comment in a variable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46755
diff changeset
    60
      DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)"
46980
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    61
      STABLE_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\nâš  This patch is intended for stable âš \n{image https://media.giphy.com/media/nYI8SmmChYXK0/source.gif}"
45991
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45965
diff changeset
    62
    script:
46980
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    63
      - |
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    64
        if [ `hg branch` == "stable" ]; then
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    65
            ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT";
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    66
        else
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    67
            ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT";
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
    68
        fi
45991
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45965
diff changeset
    69
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    70
test-py2:
44253
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44252
diff changeset
    71
    <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44252
diff changeset
    72
    variables:
44490
b3991b72d9f1 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44430
diff changeset
    73
        RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
44430
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44255
diff changeset
    74
        TEST_HGMODULEPOLICY: "c"
46676
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46426
diff changeset
    75
        TEST_HGTESTS_ALLOW_NETIO: "1"
44253
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44252
diff changeset
    76
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    77
test-py3:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    78
    <<: *runtests
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    79
    variables:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    80
        RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    81
        PYTHON: python3
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    82
        TEST_HGMODULEPOLICY: "c"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    83
        TEST_HGTESTS_ALLOW_NETIO: "1"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    84
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    85
test-py2-pure:
44254
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44253
diff changeset
    86
    <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44253
diff changeset
    87
    variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44253
diff changeset
    88
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
44430
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44255
diff changeset
    89
        TEST_HGMODULEPOLICY: "py"
44254
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44253
diff changeset
    90
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    91
test-py3-pure:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    92
    <<: *runtests
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    93
    variables:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    94
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    95
        PYTHON: python3
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    96
        TEST_HGMODULEPOLICY: "py"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    97
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
    98
test-py2-rust:
44255
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44254
diff changeset
    99
    <<: *runtests
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44254
diff changeset
   100
    variables:
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44254
diff changeset
   101
        HGWITHRUSTEXT: cpython
44490
b3991b72d9f1 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44430
diff changeset
   102
        RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
44430
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44255
diff changeset
   103
        TEST_HGMODULEPOLICY: "rust+c"
44255
541a509a47a8 heptapod-ci: add a job to test the rust version of Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44254
diff changeset
   104
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   105
test-py3-rust:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   106
    <<: *runtests
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   107
    variables:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   108
        HGWITHRUSTEXT: cpython
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   109
        RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   110
        PYTHON: python3
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   111
        TEST_HGMODULEPOLICY: "rust+c"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   112
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   113
test-py3-rhg:
46755
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46676
diff changeset
   114
    <<: *runtests
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46676
diff changeset
   115
    variables:
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46676
diff changeset
   116
        HGWITHRUSTEXT: cpython
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46676
diff changeset
   117
        RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   118
        PYTHON: python3
46755
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46676
diff changeset
   119
        TEST_HGMODULEPOLICY: "rust+c"
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46676
diff changeset
   120
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   121
test-py2-chg:
44936
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44577
diff changeset
   122
    <<: *runtests
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44577
diff changeset
   123
    variables:
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44577
diff changeset
   124
        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: 44577
diff changeset
   125
        TEST_HGMODULEPOLICY: "c"
46146
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46045
diff changeset
   126
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   127
test-py3-chg:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   128
    <<: *runtests
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   129
    variables:
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   130
        PYTHON: python3
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   131
        RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   132
        TEST_HGMODULEPOLICY: "c"
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   133
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   134
check-pytype-py3:
47081
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   135
    extends: .runtests_template
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   136
    before_script:
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   137
      - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   138
      - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   139
      - cd /tmp/mercurial-ci/
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   140
      - make local PYTHON=$PYTHON
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   141
      - $PYTHON -m pip install --user -U pytype==2021.04.15
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   142
    variables:
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   143
        RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t"
48276
f3e218ae3fd9 heptapod-ci: actually give pytest more time before timeout
Raphaël Gomès <rgomes@octobus.net>
parents: 48070
diff changeset
   144
        HGTEST_SLOWTIMEOUT: "3600"
48404
0ad593b60760 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net>
parents: 48329
diff changeset
   145
        PYTHON: python3
47081
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
   146
        TEST_HGMODULEPOLICY: "c"
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   147
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   148
# `sh.exe --login` sets a couple of extra environment variables that are defined
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   149
# in the MinGW shell, but switches CWD to /home/$username.  The previous value
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   150
# is stored in OLDPWD.  Of the added variables, MSYSTEM is crucial to running
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   151
# run-tests.py- it is needed to make run-tests.py generate a `python3` script
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   152
# that satisfies the various shebang lines and delegates to `py -3`.
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   153
.window_runtests_template: &windows_runtests
47825
f6879956a386 ci: add a "all" template to easily control "when" test run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47810
diff changeset
   154
    <<: *all
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   155
    stage: tests
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   156
    before_script:
47806
d5d46dcd356b windows-ci: clean up the Heptapod CI file now that the baseline is solid
Raphaël Gomès <rgomes@octobus.net>
parents: 47792
diff changeset
   157
      - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt'
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   158
      # TODO: find/install cvs, bzr, perforce, gpg, sqlite3
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   159
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   160
    script:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   161
        - echo "Entering script section"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   162
        - echo "python used, $Env:PYTHON"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   163
        - Invoke-Expression "$Env:PYTHON -V"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   164
        - Invoke-Expression "$Env:PYTHON -m black --version"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   165
        - echo "$Env:RUNTEST_ARGS"
47806
d5d46dcd356b windows-ci: clean up the Heptapod CI file now that the baseline is solid
Raphaël Gomès <rgomes@octobus.net>
parents: 47792
diff changeset
   166
        - echo "$Env:TMP"
d5d46dcd356b windows-ci: clean up the Heptapod CI file now that the baseline is solid
Raphaël Gomès <rgomes@octobus.net>
parents: 47792
diff changeset
   167
        - echo "$Env:TEMP"
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   168
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   169
        - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS'
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   170
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   171
windows-py3:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   172
    <<: *windows_runtests
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   173
    tags:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   174
      - windows
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   175
    variables:
47645
b41b4c1c644f windows: enforce the module policy to be c for test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47570
diff changeset
   176
        TEST_HGMODULEPOLICY: "c"
47806
d5d46dcd356b windows-ci: clean up the Heptapod CI file now that the baseline is solid
Raphaël Gomès <rgomes@octobus.net>
parents: 47792
diff changeset
   177
        RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt"
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47081
diff changeset
   178
        PYTHON: py -3
47827
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   179
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   180
windows-py3-pyox:
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   181
    <<: *windows_runtests
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   182
    tags:
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   183
      - windows
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   184
    variables:
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   185
        TEST_HGMODULEPOLICY: "c"
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   186
        RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized"
9261326dd032 ci: run --pyoxidized tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 47825
diff changeset
   187
        PYTHON: py -3