##// END OF EJS Templates
ci: stop running with Python 2...
Martin von Zweigbergk -
r49529:5d83a40c default
parent child Browse files
Show More
@@ -1,188 +1,143 b''
1 1 stages:
2 2 - tests
3 3 - phabricator
4 4
5 5 image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
6 6
7 7 variables:
8 PYTHON: python
8 PYTHON: python3
9 9 TEST_HGMODULEPOLICY: "allow"
10 10 HG_CI_IMAGE_TAG: "latest"
11 11 TEST_HGTESTS_ALLOW_NETIO: "0"
12 12
13 13 .all_template: &all
14 14 when: always
15 15
16 16 .runtests_template: &runtests
17 17 <<: *all
18 18 stage: tests
19 19 # The runner made a clone as root.
20 20 # We make a new clone owned by user used to run the step.
21 21 before_script:
22 22 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
23 23 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
24 24 - cd /tmp/mercurial-ci/
25 25 - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
26 26 - black --version
27 27 - clang-format --version
28 28 script:
29 29 - echo "python used, $PYTHON"
30 30 - echo "$RUNTEST_ARGS"
31 31 - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
32 32
33 checks-py2:
33 checks:
34 34 <<: *runtests
35 35 variables:
36 36 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
37 37
38 checks-py3:
39 <<: *runtests
40 variables:
41 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
42 PYTHON: python3
43
44 rust-cargo-test-py2: &rust_cargo_test
38 rust-cargo-test:
45 39 <<: *all
46 40 stage: tests
47 41 script:
48 - echo "python used, $PYTHON"
49 42 - make rust-tests
50 43
51 rust-cargo-test-py3:
52 stage: tests
53 <<: *rust_cargo_test
54 variables:
55 PYTHON: python3
56
57 44 phabricator-refresh:
58 45 stage: phabricator
59 46 variables:
60 47 DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)"
61 48 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}"
62 49 script:
63 50 - |
64 51 if [ `hg branch` == "stable" ]; then
65 52 ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT";
66 53 else
67 54 ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT";
68 55 fi
69 56
70 test-py2:
57 test:
71 58 <<: *runtests
72 59 variables:
73 60 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
74 61 TEST_HGMODULEPOLICY: "c"
75 62 TEST_HGTESTS_ALLOW_NETIO: "1"
76 63
77 test-py3:
78 <<: *runtests
79 variables:
80 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
81 PYTHON: python3
82 TEST_HGMODULEPOLICY: "c"
83 TEST_HGTESTS_ALLOW_NETIO: "1"
84
85 test-py2-pure:
64 test-pure:
86 65 <<: *runtests
87 66 variables:
88 67 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
89 68 TEST_HGMODULEPOLICY: "py"
90 69
91 test-py3-pure:
92 <<: *runtests
93 variables:
94 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
95 PYTHON: python3
96 TEST_HGMODULEPOLICY: "py"
97
98 test-py2-rust:
70 test-rust:
99 71 <<: *runtests
100 72 variables:
101 73 HGWITHRUSTEXT: cpython
102 74 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
103 75 TEST_HGMODULEPOLICY: "rust+c"
104 76
105 test-py3-rust:
106 <<: *runtests
107 variables:
108 HGWITHRUSTEXT: cpython
109 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
110 PYTHON: python3
111 TEST_HGMODULEPOLICY: "rust+c"
112
113 test-py3-rhg:
77 test-rhg:
114 78 <<: *runtests
115 79 variables:
116 80 HGWITHRUSTEXT: cpython
117 81 RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
118 PYTHON: python3
119 82 TEST_HGMODULEPOLICY: "rust+c"
120 83
121 test-py2-chg:
84 test-chg:
122 85 <<: *runtests
123 86 variables:
124 87 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
125 88 TEST_HGMODULEPOLICY: "c"
126 89
127 test-py3-chg:
128 <<: *runtests
129 variables:
130 PYTHON: python3
131 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
132 TEST_HGMODULEPOLICY: "c"
133
134 check-pytype-py3:
90 check-pytype:
135 91 extends: .runtests_template
136 92 before_script:
137 93 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
138 94 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
139 95 - cd /tmp/mercurial-ci/
140 96 - make local PYTHON=$PYTHON
141 97 - $PYTHON -m pip install --user -U pytype==2021.04.15
142 98 variables:
143 99 RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t"
144 100 HGTEST_SLOWTIMEOUT: "3600"
145 PYTHON: python3
146 101 TEST_HGMODULEPOLICY: "c"
147 102
148 103 # `sh.exe --login` sets a couple of extra environment variables that are defined
149 104 # in the MinGW shell, but switches CWD to /home/$username. The previous value
150 105 # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running
151 106 # run-tests.py- it is needed to make run-tests.py generate a `python3` script
152 107 # that satisfies the various shebang lines and delegates to `py -3`.
153 108 .window_runtests_template: &windows_runtests
154 109 <<: *all
155 110 when: manual # we don't have any Windows runners anymore at the moment
156 111 stage: tests
157 112 before_script:
158 113 - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt'
159 114 # TODO: find/install cvs, bzr, perforce, gpg, sqlite3
160 115
161 116 script:
162 117 - echo "Entering script section"
163 118 - echo "python used, $Env:PYTHON"
164 119 - Invoke-Expression "$Env:PYTHON -V"
165 120 - Invoke-Expression "$Env:PYTHON -m black --version"
166 121 - echo "$Env:RUNTEST_ARGS"
167 122 - echo "$Env:TMP"
168 123 - echo "$Env:TEMP"
169 124
170 125 - 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'
171 126
172 127 windows-py3:
173 128 <<: *windows_runtests
174 129 tags:
175 130 - windows
176 131 variables:
177 132 TEST_HGMODULEPOLICY: "c"
178 133 RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt"
179 134 PYTHON: py -3
180 135
181 136 windows-py3-pyox:
182 137 <<: *windows_runtests
183 138 tags:
184 139 - windows
185 140 variables:
186 141 TEST_HGMODULEPOLICY: "c"
187 142 RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized"
188 143 PYTHON: py -3
General Comments 0
You need to be logged in to leave comments. Login now