@@ -101,105 +101,14 @@ jobs:
101
101
102
102
phpstan :
103
103
name : " PHPStan"
104
- runs-on : " ubuntu-latest"
105
-
106
- steps :
107
- - name : Checkout code
108
- uses : actions/checkout@v4
109
-
110
- - name : Install PHP
111
- uses : shivammathur/setup-php@v2
112
- with :
113
- php-version : ' latest'
114
- coverage : none
115
- tools : phpstan
116
-
117
- # Install dependencies and handle caching in one go.
118
- # Dependencies need to be installed to make sure the PHPCS and PHPUnit classes are recognized.
119
- # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
120
- - name : Install Composer dependencies
121
- uses : " ramsey/composer-install@v3"
122
- with :
123
- # Bust the cache at least once a month - output format: YYYY-MM.
124
- custom-cache-suffix : $(date -u "+%Y-%m")
125
-
126
- - name : Run PHPStan
127
- run : phpstan analyse
104
+ uses : PHPCSStandards/.github/.github/workflows/reusable-phpstan.yml@main
128
105
129
106
remark :
130
107
name : ' QA Markdown'
131
- runs-on : ubuntu-latest
132
-
133
- steps :
134
- - name : Checkout code
135
- uses : actions/checkout@v4
136
-
137
- - name : Set up node and enable caching of dependencies
138
- uses : actions/setup-node@v4
139
- with :
140
- node-version : ' 16'
141
-
142
- # To make the command available on CLI, it needs to be installed globally.
143
- - name : Install Remark CLI globally
144
- run : npm install --global remark-cli --foreground-scripts true --fund false
145
-
146
- # To allow for creating a custom config which references rules which are included
147
- # in the presets, without having to install all rules individually, a local install
148
- # works best (and installing the presets in the first place, of course).
149
- #
150
- # Note: the first group of packages are all part of the mono "Remark lint" repo.
151
- # The second group of packages (heading-whitespace and down) are additional
152
- # "external" rules/plugins.
153
- - name : Install Remark rules locally
154
- run : >
155
- npm install --foreground-scripts true --fund false
156
- remark-lint
157
- remark-gfm
158
- remark-preset-lint-consistent
159
- remark-preset-lint-recommended
160
- remark-preset-lint-markdown-style-guide
161
- remark-lint-checkbox-content-indent
162
- remark-lint-linebreak-style
163
- remark-lint-no-duplicate-defined-urls
164
- remark-lint-no-empty-url
165
- remark-lint-no-heading-like-paragraph
166
- remark-lint-no-reference-like-url
167
- remark-lint-no-unneeded-full-reference-image
168
- remark-lint-no-unneeded-full-reference-link
169
- remark-lint-strikethrough-marker
170
- remark-lint-heading-whitespace
171
- remark-lint-list-item-punctuation
172
- remark-lint-match-punctuation
173
- remark-lint-no-dead-urls
174
- remark-lint-no-hr-after-heading
175
- remark-lint-are-links-valid-duplicate
176
- remark-validate-links
177
-
178
- - name : Run Remark-lint
179
- run : remark . --frail
180
-
181
- # @link https://github.com/reviewdog/action-remark-lint
182
- - name : Show Remark-lint annotations in PR
183
- if : ${{ failure() && github.event_name == 'pull_request' }}
184
- uses : reviewdog/action-remark-lint@v5
185
- with :
186
- fail_on_error : true
187
- install_deps : false
188
- level : info
189
- reporter : github-pr-check
108
+ uses : PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main
190
109
191
110
yamllint :
192
111
name : ' Lint Yaml'
193
- runs-on : ubuntu-latest
194
-
195
- steps :
196
- - name : Checkout code
197
- uses : actions/checkout@v4
198
-
199
- # Ref: https://yamllint.readthedocs.io/en/stable/
200
- - name : Run Yamllint on all yaml files in repo
201
- run : yamllint . --format colored
202
-
203
- - name : Pipe Yamllint results on to GH for inline display
204
- if : ${{ failure() }}
205
- run : yamllint . --format github
112
+ uses : PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@main
113
+ with :
114
+ strict : true
0 commit comments