annotate contrib/heptapod-ci.yml @ 47719:1168e54b727c

dirstate: deprecate the `normal` method in all cases All code have been migrated to the new APIs. Differential Revision: https://phab.mercurial-scm.org/D11161
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 00:29:36 +0200
parents b41b4c1c644f
children 6c86f96042c9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45974
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45912
diff changeset
1 stages:
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45912
diff changeset
2 - tests
46006
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45980
diff changeset
3 - phabricator
45974
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45912
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
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
6
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
7 variables:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
8 PYTHON: python
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
9 TEST_HGMODULEPOLICY: "allow"
46473
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"
46715
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46494
diff changeset
11 TEST_HGTESTS_ALLOW_NETIO: "0"
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
12
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
13 .runtests_template: &runtests
45974
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45912
diff changeset
14 stage: tests
46244
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46147
diff changeset
15 # The runner made a clone as root.
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46147
diff changeset
16 # 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: 46147
diff changeset
17 before_script:
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46147
diff changeset
18 - 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: 46147
diff changeset
19 - 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: 46147
diff changeset
20 - cd /tmp/mercurial-ci/
fb69b51b4daa ci: avoid a global before_script definition
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 46147
diff changeset
21 - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
46474
6b0dac9f650a heptapod-ci: indicate which version of black is used for the run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46473
diff changeset
22 - black --version
46476
a390c7fcd286 heptapod-ci: indicate which version of clang-format is used for the run
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46474
diff changeset
23 - clang-format --version
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
24 script:
44168
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
25 - 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
26 - echo "$RUNTEST_ARGS"
46715
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46494
diff changeset
27 - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" 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
28
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
29 checks-py2:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
30 <<: *runtests
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
31 variables:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
32 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
33
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
34 checks-py3:
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
35 <<: *runtests
2aa2408e7515 heptapod-ci: run test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44167
diff changeset
36 variables:
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
37 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
38 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
39
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 rust-cargo-test-py2: &rust_cargo_test
45974
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45912
diff changeset
41 stage: tests
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
42 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
43 - 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
44 - 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
45
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
46 rust-cargo-test-py3:
45974
3a3a510617e5 heptapod-ci: add a explicite "test" phases
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45912
diff changeset
47 stage: tests
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
48 <<: *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
49 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
50 PYTHON: python3
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
51
46006
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45980
diff changeset
52 phabricator-refresh:
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45980
diff changeset
53 stage: phabricator
46979
66cc5f867ddc phab-refresh: extract the comment in a variable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46768
diff changeset
54 variables:
66cc5f867ddc phab-refresh: extract the comment in a variable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46768
diff changeset
55 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
56 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}"
46006
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45980
diff changeset
57 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
58 - |
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
59 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
60 ./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
61 else
75351b8b2082 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46979
diff changeset
62 ./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
63 fi
46006
c7f40562389f heptapod-ci: automatically refresh existing phabricator Diff on push
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45980
diff changeset
64
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
65 test-py2:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
66 <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
67 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
68 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
69 TEST_HGMODULEPOLICY: "c"
46715
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46494
diff changeset
70 TEST_HGTESTS_ALLOW_NETIO: "1"
44170
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
71
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
72 test-py3:
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
73 <<: *runtests
8814308e83bb heptapod-ci: run the normal test suite
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44169
diff changeset
74 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
75 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
76 PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
77 TEST_HGMODULEPOLICY: "c"
46715
b41f551c5dc7 ci: hook network-io tests into the pipeline
Joerg Sonnenberger <joerg@bec.de>
parents: 46494
diff changeset
78 TEST_HGTESTS_ALLOW_NETIO: "1"
44171
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
79
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
80 test-py2-pure:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
81 <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
82 variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
83 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
84 TEST_HGMODULEPOLICY: "py"
44171
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
85
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
86 test-py3-pure:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
87 <<: *runtests
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
88 variables:
6733c565ca46 heptapod-ci: run the --pure test too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44170
diff changeset
89 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
90 PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
91 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
92
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
93 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
94 <<: *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
95 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
96 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
97 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
98 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
99
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
100 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
101 <<: *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
102 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
103 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
104 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
105 PYTHON: python3
44198
4bd35d25903f heptapod-ci: use strict module policy
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44172
diff changeset
106 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
107
46768
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
108 test-py3-rhg:
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
109 <<: *runtests
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
110 variables:
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
111 HGWITHRUSTEXT: cpython
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
112 RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
113 PYTHON: python3
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
114 TEST_HGMODULEPOLICY: "rust+c"
6b5714479288 ci: Add a job testing with rhg installed as `hg`
Simon Sapin <simon.sapin@octobus.net>
parents: 46715
diff changeset
115
44977
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
116 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
117 <<: *runtests
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
118 variables:
aa568b6c6a10 heptapod-ci: also run tests for chg on python 2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44586
diff changeset
119 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
120 TEST_HGMODULEPOLICY: "c"
46147
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
121
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
122 test-py3-chg:
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
123 <<: *runtests
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
124 variables:
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
125 PYTHON: python3
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
126 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
d109dda4a3e7 contrib: run python3+chg tests too in heptapod CI
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46049
diff changeset
127 TEST_HGMODULEPOLICY: "c"
47040
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
128
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
129 check-pytype-py3:
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
130 extends: .runtests_template
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
131 when: manual
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
132 before_script:
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
133 - 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
134 - 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
135 - cd /tmp/mercurial-ci/
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
136 - make local PYTHON=$PYTHON
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
137 - $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
138 variables:
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
139 RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t"
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
140 PYTHON: python3
e917fa36fb58 heptapod-ci: enable pytype checking
Matt Harbison <matt_harbison@yahoo.com>
parents: 46980
diff changeset
141 TEST_HGMODULEPOLICY: "c"
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
142
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
143 # `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: 47040
diff changeset
144 # 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: 47040
diff changeset
145 # 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: 47040
diff changeset
146 # 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: 47040
diff changeset
147 # 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: 47040
diff changeset
148 .window_runtests_template: &windows_runtests
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
149 stage: tests
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
150 before_script:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
151 # Temporary until this is adjusted in the environment
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
152 - $Env:TEMP="C:/Temp"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
153 - $Env:TMP="C:/Temp"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
154 # TODO: find/install cvs, bzr, perforce, gpg, sqlite3
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
155
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
156 script:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
157 - echo "Entering script section"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
158 - echo "python used, $Env:PYTHON"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
159 - Invoke-Expression "$Env:PYTHON -V"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
160 - Invoke-Expression "$Env:PYTHON -m black --version"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
161 - echo "$Env:RUNTEST_ARGS"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
162
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
163 - 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: 47040
diff changeset
164
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
165 windows-py3:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
166 <<: *windows_runtests
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
167 when: manual
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
168 tags:
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
169 - windows
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
170 timeout: 2h
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
171 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
172 TEST_HGMODULEPOLICY: "c"
47570
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
173 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
bc01b8ad6134 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net>
parents: 47040
diff changeset
174 PYTHON: py -3