|
37 | 37 | strategy: |
38 | 38 | fail-fast: false |
39 | 39 | matrix: |
40 | | - php: ['7.4', '8.0', '8.1'] |
41 | | - moodle-branch: ['MOODLE_401_STABLE'] |
| 40 | + php: ['8.0', '8.1', '8.2'] |
| 41 | + moodle-branch: ['MOODLE_403_STABLE'] |
42 | 42 | database: [pgsql, mariadb] |
43 | 43 |
|
44 | 44 | steps: |
@@ -66,55 +66,61 @@ jobs: |
66 | 66 | echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV |
67 | 67 |
|
68 | 68 | - name: Install moodle-plugin-ci |
69 | | - run: | |
70 | | - moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1 |
| 69 | + run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1 |
71 | 70 | env: |
72 | 71 | DB: ${{ matrix.database }} |
73 | 72 | MOODLE_BRANCH: ${{ matrix.moodle-branch }} |
| 73 | + # Uncomment this to run Behat tests using the Moodle App. |
| 74 | + # MOODLE_APP: 'true' |
74 | 75 |
|
75 | 76 | - name: PHP Lint |
76 | | - if: ${{ always() }} |
| 77 | + if: ${{ !cancelled() }} |
77 | 78 | run: moodle-plugin-ci phplint |
78 | 79 |
|
79 | 80 | - name: PHP Copy/Paste Detector |
80 | 81 | continue-on-error: true # This step will show errors but will not fail |
81 | | - if: ${{ always() }} |
| 82 | + if: ${{ !cancelled() }} |
82 | 83 | run: moodle-plugin-ci phpcpd |
83 | 84 |
|
| 85 | + # For now, assume this succeeds. |
84 | 86 | - name: PHP Mess Detector |
85 | 87 | continue-on-error: true # This step will show errors but will not fail |
86 | | - if: ${{ always() }} |
| 88 | + if: ${{ !cancelled() }} |
87 | 89 | run: moodle-plugin-ci phpmd || true |
88 | 90 |
|
89 | 91 | - name: Moodle Code Checker |
90 | | - if: ${{ always() }} |
| 92 | + if: ${{ !cancelled() }} |
91 | 93 | run: moodle-plugin-ci phpcs --max-warnings 0 |
92 | 94 |
|
93 | 95 | - name: Moodle PHPDoc Checker |
94 | | - if: ${{ always() }} |
| 96 | + if: ${{ !cancelled() }} |
95 | 97 | run: moodle-plugin-ci phpdoc --max-warnings 0 |
96 | 98 |
|
97 | 99 | - name: Validating |
98 | | - if: ${{ always() }} |
| 100 | + if: ${{ !cancelled() }} |
99 | 101 | run: moodle-plugin-ci validate |
100 | 102 |
|
101 | 103 | - name: Check upgrade savepoints |
102 | | - if: ${{ always() }} |
| 104 | + if: ${{ !cancelled() }} |
103 | 105 | run: moodle-plugin-ci savepoints |
104 | 106 |
|
105 | 107 | - name: Mustache Lint |
106 | | - if: ${{ always() }} |
| 108 | + if: ${{ !cancelled() }} |
107 | 109 | run: moodle-plugin-ci mustache |
108 | 110 |
|
109 | | - # At this stage, assume this succeeds. |
| 111 | + # For now, assume this succeeds. |
110 | 112 | - name: Grunt |
111 | | - if: ${{ always() }} |
| 113 | + if: ${{ !cancelled() }} |
112 | 114 | run: moodle-plugin-ci grunt --max-lint-warnings 0 || true |
113 | 115 |
|
114 | 116 | - name: PHPUnit tests |
115 | | - if: ${{ always() }} |
| 117 | + if: ${{ !cancelled() }} |
116 | 118 | run: moodle-plugin-ci phpunit --fail-on-warning |
117 | 119 |
|
118 | 120 | - name: Behat features |
119 | | - if: ${{ always() }} |
| 121 | + if: ${{ !cancelled() }} |
120 | 122 | run: moodle-plugin-ci behat --profile chrome |
| 123 | + |
| 124 | + - name: Mark cancelled jobs as failed. |
| 125 | + if: ${{ cancelled() }} |
| 126 | + run: exit 1 |
0 commit comments