BitBadger.Documents/src/test_all.sh
Daniel J. Summers 147a72b476 Final tweaks for v4 (#9)
- Add .NET 9, PostgreSQL 17 support
- Drop .NET 6, PostgreSQL 12 support
- Finalize READMEs

Reviewed-on: #9
2024-12-18 03:33:11 +00:00

34 lines
867 B
Bash
Executable File

#!/bin/bash
dotnet clean BitBadger.Documents.sln
dotnet restore BitBadger.Documents.sln
dotnet build BitBadger.Documents.sln --no-restore
cd ./Tests || exit
export BBDOX_PG_PORT=8301
PG_VERSIONS=('13' '14' '15' '16' 'latest')
NET_VERSIONS=('8.0' '9.0')
for PG_VERSION in "${PG_VERSIONS[@]}"
do
echo Starting PostgreSQL:$PG_VERSION
docker run -d -p $BBDOX_PG_PORT:5432 --name pg_test -e POSTGRES_PASSWORD=postgres postgres:$PG_VERSION
sleep 4
for NET_VERSION in "${NET_VERSIONS[@]}"
do
if [ "$PG_VERSION" = "latest" ]; then
echo Testing SQLite and PostgreSQL under .NET $NET_VERSION...
dotnet run -f net$NET_VERSION
else
echo Testing PostgreSQL v$PG_VERSION under .NET $NET_VERSION...
BBDOX_PG_ONLY="true" dotnet run -f net$NET_VERSION
fi
done
docker stop pg_test
sleep 2
docker rm pg_test
done
cd .. || exit