Skip to content

Commit d3f3a29

Browse files
Remove formatting checks from CI workflow
1 parent 3bc7bee commit d3f3a29

1 file changed

Lines changed: 2 additions & 89 deletions

File tree

.github/workflows/pr_ci.yml

Lines changed: 2 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
verify:
15-
name: Format, Build, Test
15+
name: Build and test
1616
runs-on: ubuntu-latest
1717

1818
steps:
@@ -47,12 +47,6 @@ jobs:
4747
build_template=false
4848
4949
declare -a changed_cs=()
50-
declare -a format_godotutils=()
51-
declare -a format_visualize=()
52-
declare -a format_packetgen=()
53-
declare -a format_optionsgen=()
54-
declare -a format_template=()
55-
declare -a format_fallback=()
5650
5751
for changed_path in "${CHANGED_PATHS[@]}"; do
5852
[[ -z "$changed_path" ]] && continue
@@ -82,29 +76,6 @@ jobs:
8276
esac
8377
done
8478
85-
for cs_path in "${changed_cs[@]}"; do
86-
case "$cs_path" in
87-
Template.GodotUtils/*.cs)
88-
format_godotutils+=("$cs_path")
89-
;;
90-
Template.Visualize/*.cs)
91-
format_visualize+=("$cs_path")
92-
;;
93-
Template.PacketGen/*.cs)
94-
format_packetgen+=("$cs_path")
95-
;;
96-
Template.OptionsGen/*.cs)
97-
format_optionsgen+=("$cs_path")
98-
;;
99-
Template/*.cs)
100-
format_template+=("$cs_path")
101-
;;
102-
*)
103-
format_fallback+=("$cs_path")
104-
;;
105-
esac
106-
done
107-
10879
if $build_visualize; then
10980
build_godotutils=true
11081
fi
@@ -133,18 +104,6 @@ jobs:
133104
has_cs_changes=true
134105
fi
135106
136-
write_output_array() {
137-
local output_name="$1"
138-
shift
139-
local -a output_values=("$@")
140-
141-
{
142-
echo "${output_name}<<EOF"
143-
printf '%s\n' "${output_values[@]}"
144-
echo "EOF"
145-
} >> "$GITHUB_OUTPUT"
146-
}
147-
148107
{
149108
echo "build_godotutils=$build_godotutils"
150109
echo "build_visualize=$build_visualize"
@@ -154,59 +113,13 @@ jobs:
154113
echo "has_cs_changes=$has_cs_changes"
155114
} >> "$GITHUB_OUTPUT"
156115
157-
write_output_array "format_godotutils_includes" "${format_godotutils[@]}"
158-
write_output_array "format_visualize_includes" "${format_visualize[@]}"
159-
write_output_array "format_packetgen_includes" "${format_packetgen[@]}"
160-
write_output_array "format_optionsgen_includes" "${format_optionsgen[@]}"
161-
write_output_array "format_template_includes" "${format_template[@]}"
162-
write_output_array "format_fallback_includes" "${format_fallback[@]}"
163-
164116
- name: Restore
165117
if: steps.changes.outputs.has_cs_changes == 'true'
166118
run: dotnet restore Template.sln
167119

168120
- name: Skip .NET validation when no C# changes
169121
if: steps.changes.outputs.has_cs_changes != 'true'
170-
run: echo "No C# changes detected. Skipping .NET format/build/test validation."
171-
172-
- name: Format checks (targeted)
173-
if: steps.changes.outputs.has_cs_changes == 'true'
174-
shell: bash
175-
run: |
176-
set -euo pipefail
177-
178-
if [[ "${{ steps.changes.outputs.has_cs_changes }}" != "true" ]]; then
179-
echo "No C# changes detected. Skipping format checks."
180-
exit 0
181-
fi
182-
183-
run_format_check() {
184-
local target="$1"
185-
local include_blob="$2"
186-
187-
if [[ -z "$include_blob" ]]; then
188-
return 0
189-
fi
190-
191-
local -a includes=()
192-
while IFS= read -r line; do
193-
[[ -z "$line" ]] && continue
194-
includes+=("$line")
195-
done <<< "$include_blob"
196-
197-
if [[ "${#includes[@]}" -eq 0 ]]; then
198-
return 0
199-
fi
200-
201-
dotnet format "$target" --verify-no-changes --include "${includes[@]}"
202-
}
203-
204-
run_format_check Template.GodotUtils/GodotUtils.csproj "${{ steps.changes.outputs.format_godotutils_includes }}"
205-
run_format_check Template.Visualize/Visualize.csproj "${{ steps.changes.outputs.format_visualize_includes }}"
206-
run_format_check Template.PacketGen/PacketGen.sln "${{ steps.changes.outputs.format_packetgen_includes }}"
207-
run_format_check Template.OptionsGen/OptionsGen/OptionsGen.csproj "${{ steps.changes.outputs.format_optionsgen_includes }}"
208-
run_format_check Template/Template.csproj "${{ steps.changes.outputs.format_template_includes }}"
209-
run_format_check Template.sln "${{ steps.changes.outputs.format_fallback_includes }}"
122+
run: echo "No C# changes detected. Skipping .NET build/test validation."
210123

211124
- name: Targeted builds
212125
if: steps.changes.outputs.has_cs_changes == 'true'

0 commit comments

Comments
 (0)