|
2 | 2 |
|
3 | 3 | load libs/shared_setup |
4 | 4 |
|
5 | | -# TODO: we will get rid of these depencies soon. |
6 | | -prepare_prechecker_npmbins () { |
7 | | - npmglobals=$LOCAL_CI_TESTS_CACHEDIR/prechecker_npmglobals |
8 | | - |
9 | | - mkdir -p $npmglobals |
10 | | - cd $npmglobals |
11 | | - |
12 | | - export csslintcmd=$npmglobals/node_modules/.bin/csslint |
13 | | - if [[ ! -f $csslintcmd ]]; then |
14 | | - npm --silent install csslint |
15 | | - fi |
16 | | - |
17 | | - export jshintcmd=$npmglobals/node_modules/.bin/jshint |
18 | | - if [[ ! -f $jshintcmd ]]; then |
19 | | - npm --silent install jshint |
20 | | - fi |
21 | | - cd $OLDPWD |
22 | | -} |
23 | | - |
24 | 5 | setup () { |
25 | | - prepare_prechecker_npmbins |
26 | | - |
27 | | - create_git_branch MOODLE_34_STABLE v3.4.0 # Must be always a .0 version coz we precheck it in master. |
| 6 | + # This was the first .0 version coming with .nvmrc file, so it's the minimum supported by local_ci. |
| 7 | + create_git_branch MOODLE_38_STABLE v3.8.0 # Must be always a .0 version coz we precheck it in master. |
28 | 8 | export WORKSPACE=$gitdir |
29 | 9 | export phpcsstandard=$LOCAL_CI_TESTS_PHPCS_DIR |
30 | 10 | } |
@@ -53,70 +33,69 @@ assert_prechecker () { |
53 | 33 |
|
54 | 34 | @test "remote_branch_checker/remote_branch_checker.sh: old branch failing" { |
55 | 35 | # An extremely old branch running jshint.. |
56 | | - assert_prechecker local_ci_fixture_oldbranch MDLSITE-3899 b3f5865eabbbdd439ac7f2ec763046f2ac7f0b37 |
| 36 | + assert_prechecker local_ci_fixture_oldbranch MDLSITE-3899 v2.9.0-rc1 |
57 | 37 | } |
58 | 38 |
|
59 | 39 | @test "remote_branch_checker/remote_branch_checker.sh: all possible checks failing" { |
60 | 40 | # A branch with a good number of errors |
61 | | - assert_prechecker local_ci_fixture_manyproblems MDL-53136 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 41 | + assert_prechecker local_ci_fixture_manyproblems_38 MDL-53136 v3.8.0 |
62 | 42 | } |
63 | 43 |
|
64 | 44 | @test "remote_branch_checker/remote_branch_checker.sh: all checks passing" { |
65 | | - # from https://integration.moodle.org/job/Precheck%20remote%20branch/25996/ |
66 | | - assert_prechecker MDL-53572-master-8ce58c9 MDL-53572 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 45 | + assert_prechecker local_ci_fixture_all_passing MDL-53572 v3.9.0 |
67 | 46 | } |
68 | 47 |
|
69 | 48 | @test "remote_branch_checker/remote_branch_checker.sh: stylelint checks" { |
70 | | - assert_prechecker prechecker-fixture-stylelint MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 49 | + assert_prechecker local_ci_fixture_stylelint MDL-12345 v3.9.0 |
71 | 50 | } |
72 | 51 |
|
73 | 52 | @test "remote_branch_checker/remote_branch_checker.sh: all results reported despite no php/js/css files" { |
74 | 53 | # Ensure we always report each section, even if there are no php/css/js files to check |
75 | | - assert_prechecker fixture-non-code-update MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 54 | + assert_prechecker local_ci_fixture_noncode_update MDL-12345 v3.9.0 |
76 | 55 | } |
77 | 56 |
|
78 | 57 | @test "remote_branch_checker/remote_branch_checker.sh: thirdparty css modification" { |
79 | | - # Ensure stylelint doesn't complain about the third party css, but thirdpart does |
| 58 | + # Ensure stylelint doesn't complain about the third party css, but thirdparty does |
80 | 59 | # TODO: thirdparty check bug with reporting same file twice.. |
81 | | - assert_prechecker fixture-thirdparty-css MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 60 | + assert_prechecker local_ci_fixture_thirdparty_css MDL-12345 v3.9.0 |
82 | 61 | } |
83 | 62 |
|
84 | 63 | @test "remote_branch_checker/remote_branch_checker.sh: upgrade external backup" { |
85 | | - assert_prechecker local_ci_fixture_upgrade_external_backup MDL-12345 c69c33b14d9fb83ca22bde558169e36b5e1047cf |
| 64 | + assert_prechecker local_ci_fixture_upgrade_external_backup MDL-12345 v4.0.0 |
86 | 65 | } |
87 | 66 |
|
88 | 67 | @test "remote_branch_checker/remote_branch_checker.sh: upgrade external backup skipped for plugins" { |
89 | 68 | # With branches named PLUGIN-xxxx, the upgrade_external_backup check will be skipped, |
90 | 69 | # no matter the verified branch has 3 warnings when running for non plugins. |
91 | | - assert_prechecker local_ci_fixture_upgrade_external_backup_skipped_for_plugins PLUGIN-12345 c69c33b14d9fb83ca22bde558169e36b5e1047cf |
| 70 | + assert_prechecker local_ci_fixture_upgrade_external_backup_skipped_for_plugins PLUGIN-12345 v4.0.0 |
92 | 71 | } |
93 | 72 |
|
94 | 73 | @test "remote_branch_checker/remote_branch_checker.sh: phpcs aware of all components" { |
95 | 74 | assert_prechecker local_ci_fixture_phpcs_aware_components MDL-12345 c69c33b14d9fb83ca22bde558169e36b5e1047cf |
96 | 75 | } |
97 | 76 |
|
98 | 77 | @test "remote_branch_checker/remote_branch_checker.sh: bad amos script" { |
99 | | - assert_prechecker fixture-bad-amos-commands MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 78 | + assert_prechecker local_ci_fixture_bad_amos_command MDL-12345 v3.9.0 |
100 | 79 | } |
101 | 80 |
|
102 | 81 | @test "remote_branch_checker/remote_branch_checker.sh: good amos commands" { |
103 | | - assert_prechecker fixture-good-amos-commit MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 82 | + assert_prechecker local_ci_fixture_good_amos_commit MDL-12345 v3.9.0 |
104 | 83 | } |
105 | 84 |
|
106 | 85 | @test "remote_branch_checker/remote_branch_checker.sh: mustache lint" { |
107 | | - assert_prechecker fixture-mustache-lint MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 86 | + assert_prechecker local_ci_fixture_mustache_lint MDL-12345 v3.9.0 |
108 | 87 | } |
109 | 88 |
|
110 | 89 | @test "remote_branch_checker/remote_branch_checker.sh: mustache lint eslint problem" { |
111 | | - assert_prechecker fixture-mustache-lint-js MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 90 | + assert_prechecker local_ci_fixture_mustache_lint_js MDL-12345 v3.9.0 |
112 | 91 | } |
113 | 92 |
|
114 | 93 | @test "remote_branch_checker/remote_branch_checker.sh: gherkin lint" { |
115 | | - assert_prechecker fixture-gherkin-lint MDL-12345 f968cd44e8ee5d54b1bc56823040ff770dbf18af |
| 94 | + assert_prechecker local_ci_fixture_gherkin_lint MDL-12345 v3.9.0 |
116 | 95 | } |
117 | 96 |
|
118 | 97 | @test "remote_branch_checker/remote_branch_checker.sh: grunt build failed" { |
119 | | - assert_prechecker fixture-grunt-build-failed MDL-12345 665c3ac59c35b7387a4fc70b8ac6600ce9ffeb87 |
| 98 | + assert_prechecker local_ci_fixture_grunt_build_failed MDL-12345 v3.9.0 |
120 | 99 | } |
121 | 100 |
|
122 | 101 | @test "remote_branch_checker/remote_branch_checker.sh: remote which doesnt exist" { |
|
0 commit comments