Skip to content

Commit 9f45f79

Browse files
committed
[IMP] CI: skip tests after test migration if there are no modules
1 parent e6a54b8 commit 9f45f79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/test-migration.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
done
110110
fi
111111
- name: OpenUpgrade test
112+
id: run_migration
112113
run: |
113114
# select modules and perform the upgrade
114115
MODULES_OLD=$(\
@@ -127,6 +128,8 @@ jobs:
127128
| sed -rn 's/((^\| *\|new\| *)|^\| *)([0-9a-z_]*)[ \|].*/\3/g p' \
128129
| sed '/^\s*$/d' \
129130
| paste -d, -s)
131+
echo "modules_old=$MODULES_OLD" >> $GITHUB_OUTPUT
132+
echo "modules_new=$MODULES_NEW" >> $GITHUB_OUTPUT
130133
if [ -z "$MODULES_NEW" ]; then
131134
echo "No modules to test yet"
132135
exit
@@ -160,8 +163,10 @@ jobs:
160163
--without-demo=$MODULES_NEW \
161164
--update=$MODULES_NEW
162165
- name: Generate coverage.xml
166+
if: ${{ steps.run_migration.outputs.modules_new != '' }}
163167
run: coverage xml
164168
- uses: codecov/codecov-action@v4
169+
if: ${{ steps.run_migration.outputs.modules_new != '' }}
165170
with:
166171
files: coverage.xml
167172
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)