Skip to content

Commit ff34894

Browse files
committed
Add frontend formatting check to Code Formatting job
1 parent 3496dca commit ff34894

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/code-style.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,6 @@ jobs:
152152
working-directory: developer-cli
153153
run: dotnet run -- lint --frontend
154154

155-
- name: Run Frontend Format Check
156-
working-directory: developer-cli
157-
run: |
158-
dotnet run -- format --frontend
159-
160-
git diff --exit-code || {
161-
echo "Formatting issues detected. Please run 'dotnet run --project developer-cli -- format --frontend' locally and commit the formatted code."
162-
exit 1
163-
}
164-
165155
code-formatting:
166156
name: Code Formatting
167157
needs: detect-scope
@@ -197,7 +187,7 @@ jobs:
197187
working-directory: developer-cli
198188
run: dotnet run -- build --backend ${{ needs.detect-scope.outputs.backend_scope }} --quiet
199189

200-
- name: Check for Code Formatting Issues
190+
- name: Check for Backend Formatting Issues
201191
working-directory: developer-cli
202192
run: |
203193
dotnet run format --backend ${{ needs.detect-scope.outputs.backend_scope }} ${{ needs.detect-scope.outputs.format_all_files_flag }} --no-build
@@ -207,6 +197,20 @@ jobs:
207197
exit 1
208198
}
209199
200+
- name: Build Frontend Artifacts
201+
working-directory: application
202+
run: npm run build
203+
204+
- name: Check for Frontend Formatting Issues
205+
working-directory: developer-cli
206+
run: |
207+
dotnet run -- format --frontend
208+
209+
git diff --exit-code || {
210+
echo "Formatting issues detected. Please run 'dotnet run --project developer-cli -- format --frontend' locally and commit the formatted code."
211+
exit 1
212+
}
213+
210214
sonarcloud:
211215
name: SonarCloud Analysis
212216
needs: detect-scope

0 commit comments

Comments
 (0)