add shellcheck to CI (#2478)

* add shellcheck to ci

* test ci

* install bash for shellcheck

* set globstar for bash

* cleanup shell scripts

* do not ignore automated hls tests

* rm legacy build script

* update shell scripts

* cleanup ci

* Fix misspell

* cleanup ci

* fail on curl error in ci
This commit is contained in:
Meisam
2022-12-26 04:17:13 +01:00
committed by GitHub
parent 52cf00ff85
commit c74d5b4f31
12 changed files with 72 additions and 153 deletions

View File

@@ -8,21 +8,21 @@ npm install --quiet --no-progress
# Download a specific version of ffmpeg
if [ ! -d "ffmpeg" ]; then
mkdir ffmpeg
pushd ffmpeg >/dev/null
pushd ffmpeg >/dev/null || exit
curl -sL https://github.com/vot/ffbinaries-prebuilt/releases/download/v4.2.1/ffmpeg-4.2.1-linux-64.zip --output ffmpeg.zip >/dev/null
unzip -o ffmpeg.zip >/dev/null
PATH=$PATH:$(pwd)
popd >/dev/null
popd >/dev/null || exit
fi
pushd ../../.. >/dev/null
pushd ../../.. >/dev/null || exit
# Build and run owncast from source
go build -o owncast main.go
./owncast -database $TEMP_DB &
./owncast -database "$TEMP_DB" &
SERVER_PID=$!
popd >/dev/null
popd >/dev/null || exit
sleep 5
# Start streaming the test file over RTMP to
@@ -31,7 +31,7 @@ ffmpeg -hide_banner -loglevel panic -stream_loop -1 -re -i ../test.mp4 -vcodec l
FFMPEG_PID=$!
function finish {
rm $TEMP_DB
rm "$TEMP_DB"
kill $SERVER_PID $FFMPEG_PID
}
trap finish EXIT

View File

@@ -26,7 +26,7 @@ if [ ! -d "ffmpeg" ]; then
echo "Downloading ffmpeg..."
mkdir -p /tmp/ffmpeg
pushd /tmp/ffmpeg >/dev/null
curl -sL https://github.com/vot/ffbinaries-prebuilt/releases/download/v4.2.1/ffmpeg-4.2.1-linux-64.zip --output ffmpeg.zip >/dev/null
curl -sL --fail https://github.com/vot/ffbinaries-prebuilt/releases/download/v4.2.1/ffmpeg-4.2.1-linux-64.zip --output ffmpeg.zip
unzip -o ffmpeg.zip >/dev/null
PATH=$PATH:$(pwd)
popd >/dev/null
@@ -36,7 +36,7 @@ fi
echo "Building owncast..."
go build -o owncast main.go
echo "Running owncast..."
./owncast -database $TEMP_DB &
./owncast -database "$TEMP_DB" &
SERVER_PID=$!
pushd test/automated/browser
@@ -54,7 +54,7 @@ STREAMING_CLIENT=$!
function finish {
echo "Cleaning up..."
rm $TEMP_DB
rm "$TEMP_DB"
kill $SERVER_PID $STREAMING_CLIENT
}
trap finish EXIT SIGHUP SIGINT SIGTERM SIGQUIT SIGABRT SIGTERM

View File

@@ -37,12 +37,12 @@ pushd ../../.. >/dev/null
# Build and run owncast from source
go build -o owncast main.go
./owncast -database $TEMP_DB &
./owncast -database "$TEMP_DB" &
SERVER_PID=$!
function finish {
echo "Cleaning up..."
rm $TEMP_DB
rm "$TEMP_DB"
kill $SERVER_PID $STREAMING_CLIENT
}
trap finish EXIT