summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-02-27 23:59:56 +0300
committerKiran Kumar Ballapalli <kirankumarb@ami.com>2024-03-04 10:57:05 +0300
commit02e1497349377af132d987bad9980299af45201b (patch)
tree833ac33ab4049729d5b30be6f2530379b0cef962
parent665235c663afda9afb8c454ecb8c340af253af9e (diff)
downloadwebui-vue-02e1497349377af132d987bad9980299af45201b.tar.xz
Move ci from format-code to run-ci
Format code is supposed to do just that... format code. npm ci is doing much more than that, so it belongs in run-ci. Change-Id: I4c4e94f1a53e04aa13289aea259098143377cc2c Signed-off-by: Ed Tanous <ed@tanous.net>
-rwxr-xr-xformat-code.sh7
-rwxr-xr-xrun-ci3
2 files changed, 7 insertions, 3 deletions
diff --git a/format-code.sh b/format-code.sh
index 9649a403..b93ca626 100755
--- a/format-code.sh
+++ b/format-code.sh
@@ -14,6 +14,11 @@ if [ -n "$1" ]; then
cd "$1"
fi
-npm ci
+npm install
npm run lint
+
+# CI might be running a different version of NPM than yocto, and we don't
+# want to trigger a formatting failure if package-lock.json has changed
+# Therefore, revert it back to what it was previously.
+git checkout package-lock.json
git --no-pager diff --exit-code
diff --git a/run-ci b/run-ci
index 1cade53e..e0735416 100755
--- a/run-ci
+++ b/run-ci
@@ -10,6 +10,5 @@ if [ -n "$1" ]; then
cd "$1"
fi
-# It is expected that the format-code script was already run as part of the CI
-# so the node modules needed to run this script will be installed
+npm ci
npm run test:unit