Skip to content

Commit c49f585

Browse files
committed
fix(workflow): correct conditional syntax in test-legacy-upgrade.yaml
- Replace incorrect `AND` with `&&` for accurate conditional checks
1 parent 2b7fd6f commit c49f585

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/test-legacy-compilers.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ jobs:
143143
echo ::endgroup::
144144
echo ::group::smoke_test
145145
legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json)
146-
if [ "$compiler" != "$legacy_compiler" ]
147-
then
146+
if [ "$compiler" != "$legacy_compiler" ]; then
148147
echo "Compiler conversion failed, expected $compiler, got $legacy_compiler"
149148
exit 1
150149
fi

.github/workflows/test-legacy-upgrade.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
echo ::group::smoke_test
142142
configured_legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json)
143143
configured_compiler=$(yq '.items[0].value.params.compiler_hosts[0]' peadm_config.json)
144-
if [ "$configured_legacy_compiler" != "$legacy_compiler" AND "$configured_compiler" != "$compiler" ]
144+
if [ "$configured_legacy_compiler" != "$legacy_compiler" ] && [ "$configured_compiler" != "$compiler" ]; then
145145
echo "Compilers are not configured, expected $legacy_compiler and $compiler, got $configured_legacy_compiler and $configured_compiler"
146146
exit 1
147147
fi
@@ -186,7 +186,7 @@ jobs:
186186
echo ::group::smoke_test
187187
configured_legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json)
188188
configured_compiler=$(yq '.items[0].value.params.compiler_hosts[0]' peadm_config.json)
189-
if [ "$configured_legacy_compiler" != "$legacy_compiler" AND "$configured_compiler" != "$compiler" ]
189+
if [ "$configured_legacy_compiler" != "$legacy_compiler" ] && [ "$configured_compiler" != "$compiler" ]; then
190190
echo "Compilers are not configured, expected $legacy_compiler and $compiler, got $configured_legacy_compiler and $configured_compiler"
191191
exit 1
192192
fi

0 commit comments

Comments
 (0)