Move scripts into dedicated directory
Now also using scripts/check.sh for Travis CI directly
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This file performs continuous integration checks and should be run before pushing new commits
|
||||
#
|
||||
|
||||
echo "---------- Trailing whitespace check -------------"
|
||||
# check uncommitted changes
|
||||
git diff --check HEAD
|
||||
if [ $? != 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
# check all commits starting from initial commit
|
||||
git diff --check `git rev-list --max-parents=0 HEAD`..HEAD
|
||||
if [ $? != 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "---------- Running compile check -------------"
|
||||
platformio run -e mppt_2420_lc -e mppt_1210_hus -e mppt_2420_hc -e pwm_2420_lus
|
||||
if [ $? != 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "---------- Running unit-tests -------------"
|
||||
platformio test -e unit_test
|
||||
if [ $? != 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "---------- Running static code checks -------------"
|
||||
platformio check -e mppt_1210_hus -e pwm_2420_lus --skip-packages --fail-on-defect high
|
||||
if [ $? != 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "---------- All tests passed -------------"
|
||||
Reference in New Issue
Block a user