@@ -110,6 +110,7 @@ jobs:
110
110
111
111
# TODO: Add repo info to https://github.com/3846masa/stylelint-browser-compat
112
112
if [[ "${url}" == 'null' ]]; then
113
+ echo "::warning ::The repository info is missing. Visit https://github.com/3846masa/stylelint-browser-compat"
113
114
echo "url=https://github.com/3846masa/stylelint-browser-compat" >> "${GITHUB_OUTPUT}"
114
115
echo "fullname=3846masa/stylelint-browser-compat" >> "${GITHUB_OUTPUT}"
115
116
fi
@@ -140,20 +141,51 @@ jobs:
140
141
echo "yarn: $(yarn --version)"
141
142
142
143
- name : Install dependencies
143
- continue-on-error : true
144
+ id : install-dependencies
144
145
working-directory : ${{ steps.repo-info.outputs.directory }}
145
- run : npm install --no-audit
146
+ env :
147
+ PACKAGE_URL : ${{ steps.repo-info.outputs.url }}
148
+ run : |
149
+ if npm install --no-audit; then
150
+ echo "passed=true" >> "${GITHUB_OUTPUT}"
151
+ else
152
+ echo "::error ::The dependency installation failed. Visit ${PACKAGE_URL}"
153
+ fi
146
154
147
155
- name : Install Stylelint ${{ matrix.stylelint-version }}
148
- continue-on-error : true
156
+ id : install-stylelint
157
+ if : ${{ steps.install-dependencies.outputs.passed }}
158
+ working-directory : ${{ steps.repo-info.outputs.directory }}
159
+ env :
160
+ STYLELINT_VERSION : ${{ matrix.stylelint-version }}
161
+ PACKAGE_URL : ${{ steps.repo-info.outputs.url }}
162
+ run : |
163
+ if npm install --no-audit --no-save "${STYLELINT_VERSION}"; then
164
+ echo "passed=true" >> "${GITHUB_OUTPUT}"
165
+ else
166
+ echo "::error ::The Stylelint (${STYLELINT_VERSION}) installation failed. Visit ${PACKAGE_URL}"
167
+ fi
168
+
169
+ - name : Run build
170
+ id : build
171
+ if : ${{ steps.install-dependencies.outputs.passed && steps.install-stylelint.outputs.passed }}
149
172
working-directory : ${{ steps.repo-info.outputs.directory }}
150
- run : npm install --no-audit --no-save ${{ matrix.stylelint-version }}
173
+ env :
174
+ PACKAGE_URL : ${{ steps.repo-info.outputs.url }}
175
+ run : |
176
+ if npm run build --if-present; then
177
+ echo "passed=true" >> "${GITHUB_OUTPUT}"
178
+ else
179
+ echo "::error ::The build failed. Visit ${PACKAGE_URL}"
180
+ fi
151
181
152
182
- name : Run test
153
- continue-on-error : true
183
+ id : test
184
+ if : ${{ steps.install-dependencies.outputs.passed && steps.install-stylelint.outputs.passed && steps.build.outputs.passed }}
154
185
working-directory : ${{ steps.repo-info.outputs.directory }}
155
186
env :
156
- PACKAGE : ${{ matrix.package }}
157
187
PACKAGE_URL : ${{ steps.repo-info.outputs.url }}
158
188
run : |
159
- npm test || echo "::error title=${PACKAGE}::The test failed. Visit ${PACKAGE_URL}"
189
+ if ! npm test; then
190
+ echo "::error ::The test failed. Visit ${PACKAGE_URL}"
191
+ fi
0 commit comments