Show More
@@ -1,127 +1,141 b'' | |||||
1 | stages: |
|
1 | stages: | |
2 | - tests |
|
2 | - tests | |
3 | - phabricator |
|
3 | - phabricator | |
4 |
|
4 | |||
5 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG |
|
5 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG | |
6 |
|
6 | |||
7 | variables: |
|
7 | variables: | |
8 | PYTHON: python |
|
8 | PYTHON: python | |
9 | TEST_HGMODULEPOLICY: "allow" |
|
9 | TEST_HGMODULEPOLICY: "allow" | |
10 | HG_CI_IMAGE_TAG: "latest" |
|
10 | HG_CI_IMAGE_TAG: "latest" | |
11 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
11 | TEST_HGTESTS_ALLOW_NETIO: "0" | |
12 |
|
12 | |||
13 | .runtests_template: &runtests |
|
13 | .runtests_template: &runtests | |
14 | stage: tests |
|
14 | stage: tests | |
15 | # The runner made a clone as root. |
|
15 | # The runner made a clone as root. | |
16 | # We make a new clone owned by user used to run the step. |
|
16 | # We make a new clone owned by user used to run the step. | |
17 | before_script: |
|
17 | before_script: | |
18 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
18 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | |
19 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
19 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
20 | - cd /tmp/mercurial-ci/ |
|
20 | - cd /tmp/mercurial-ci/ | |
21 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt |
|
21 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt | |
22 | - black --version |
|
22 | - black --version | |
23 | - clang-format --version |
|
23 | - clang-format --version | |
24 | script: |
|
24 | script: | |
25 | - echo "python used, $PYTHON" |
|
25 | - echo "python used, $PYTHON" | |
26 | - echo "$RUNTEST_ARGS" |
|
26 | - echo "$RUNTEST_ARGS" | |
27 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS |
|
27 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS | |
28 |
|
28 | |||
29 | checks-py2: |
|
29 | checks-py2: | |
30 | <<: *runtests |
|
30 | <<: *runtests | |
31 | variables: |
|
31 | variables: | |
32 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" |
|
32 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" | |
33 |
|
33 | |||
34 | checks-py3: |
|
34 | checks-py3: | |
35 | <<: *runtests |
|
35 | <<: *runtests | |
36 | variables: |
|
36 | variables: | |
37 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" |
|
37 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" | |
38 | PYTHON: python3 |
|
38 | PYTHON: python3 | |
39 |
|
39 | |||
40 | rust-cargo-test-py2: &rust_cargo_test |
|
40 | rust-cargo-test-py2: &rust_cargo_test | |
41 | stage: tests |
|
41 | stage: tests | |
42 | script: |
|
42 | script: | |
43 | - echo "python used, $PYTHON" |
|
43 | - echo "python used, $PYTHON" | |
44 | - make rust-tests |
|
44 | - make rust-tests | |
45 |
|
45 | |||
46 | rust-cargo-test-py3: |
|
46 | rust-cargo-test-py3: | |
47 | stage: tests |
|
47 | stage: tests | |
48 | <<: *rust_cargo_test |
|
48 | <<: *rust_cargo_test | |
49 | variables: |
|
49 | variables: | |
50 | PYTHON: python3 |
|
50 | PYTHON: python3 | |
51 |
|
51 | |||
52 | phabricator-refresh: |
|
52 | phabricator-refresh: | |
53 | stage: phabricator |
|
53 | stage: phabricator | |
54 | variables: |
|
54 | variables: | |
55 | DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)" |
|
55 | DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)" | |
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}" |
|
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}" | |
57 | script: |
|
57 | script: | |
58 | - | |
|
58 | - | | |
59 | if [ `hg branch` == "stable" ]; then |
|
59 | if [ `hg branch` == "stable" ]; then | |
60 | ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT"; |
|
60 | ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT"; | |
61 | else |
|
61 | else | |
62 | ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT"; |
|
62 | ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT"; | |
63 | fi |
|
63 | fi | |
64 |
|
64 | |||
65 | test-py2: |
|
65 | test-py2: | |
66 | <<: *runtests |
|
66 | <<: *runtests | |
67 | variables: |
|
67 | variables: | |
68 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
68 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
69 | TEST_HGMODULEPOLICY: "c" |
|
69 | TEST_HGMODULEPOLICY: "c" | |
70 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
70 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
71 |
|
71 | |||
72 | test-py3: |
|
72 | test-py3: | |
73 | <<: *runtests |
|
73 | <<: *runtests | |
74 | variables: |
|
74 | variables: | |
75 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
75 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
76 | PYTHON: python3 |
|
76 | PYTHON: python3 | |
77 | TEST_HGMODULEPOLICY: "c" |
|
77 | TEST_HGMODULEPOLICY: "c" | |
78 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
78 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
79 |
|
79 | |||
80 | test-py2-pure: |
|
80 | test-py2-pure: | |
81 | <<: *runtests |
|
81 | <<: *runtests | |
82 | variables: |
|
82 | variables: | |
83 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
83 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
84 | TEST_HGMODULEPOLICY: "py" |
|
84 | TEST_HGMODULEPOLICY: "py" | |
85 |
|
85 | |||
86 | test-py3-pure: |
|
86 | test-py3-pure: | |
87 | <<: *runtests |
|
87 | <<: *runtests | |
88 | variables: |
|
88 | variables: | |
89 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
89 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
90 | PYTHON: python3 |
|
90 | PYTHON: python3 | |
91 | TEST_HGMODULEPOLICY: "py" |
|
91 | TEST_HGMODULEPOLICY: "py" | |
92 |
|
92 | |||
93 | test-py2-rust: |
|
93 | test-py2-rust: | |
94 | <<: *runtests |
|
94 | <<: *runtests | |
95 | variables: |
|
95 | variables: | |
96 | HGWITHRUSTEXT: cpython |
|
96 | HGWITHRUSTEXT: cpython | |
97 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
97 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | |
98 | TEST_HGMODULEPOLICY: "rust+c" |
|
98 | TEST_HGMODULEPOLICY: "rust+c" | |
99 |
|
99 | |||
100 | test-py3-rust: |
|
100 | test-py3-rust: | |
101 | <<: *runtests |
|
101 | <<: *runtests | |
102 | variables: |
|
102 | variables: | |
103 | HGWITHRUSTEXT: cpython |
|
103 | HGWITHRUSTEXT: cpython | |
104 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
104 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | |
105 | PYTHON: python3 |
|
105 | PYTHON: python3 | |
106 | TEST_HGMODULEPOLICY: "rust+c" |
|
106 | TEST_HGMODULEPOLICY: "rust+c" | |
107 |
|
107 | |||
108 | test-py3-rhg: |
|
108 | test-py3-rhg: | |
109 | <<: *runtests |
|
109 | <<: *runtests | |
110 | variables: |
|
110 | variables: | |
111 | HGWITHRUSTEXT: cpython |
|
111 | HGWITHRUSTEXT: cpython | |
112 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" |
|
112 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" | |
113 | PYTHON: python3 |
|
113 | PYTHON: python3 | |
114 | TEST_HGMODULEPOLICY: "rust+c" |
|
114 | TEST_HGMODULEPOLICY: "rust+c" | |
115 |
|
115 | |||
116 | test-py2-chg: |
|
116 | test-py2-chg: | |
117 | <<: *runtests |
|
117 | <<: *runtests | |
118 | variables: |
|
118 | variables: | |
119 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
119 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
120 | TEST_HGMODULEPOLICY: "c" |
|
120 | TEST_HGMODULEPOLICY: "c" | |
121 |
|
121 | |||
122 | test-py3-chg: |
|
122 | test-py3-chg: | |
123 | <<: *runtests |
|
123 | <<: *runtests | |
124 | variables: |
|
124 | variables: | |
125 | PYTHON: python3 |
|
125 | PYTHON: python3 | |
126 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
126 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
127 | TEST_HGMODULEPOLICY: "c" |
|
127 | TEST_HGMODULEPOLICY: "c" | |
|
128 | ||||
|
129 | check-pytype-py3: | |||
|
130 | extends: .runtests_template | |||
|
131 | when: manual | |||
|
132 | before_script: | |||
|
133 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | |||
|
134 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |||
|
135 | - cd /tmp/mercurial-ci/ | |||
|
136 | - make local PYTHON=$PYTHON | |||
|
137 | - $PYTHON -m pip install --user -U pytype==2021.04.15 | |||
|
138 | variables: | |||
|
139 | RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t" | |||
|
140 | PYTHON: python3 | |||
|
141 | TEST_HGMODULEPOLICY: "c" |
General Comments 0
You need to be logged in to leave comments.
Login now