mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-27 22:43:15 +08:00
* Run tests in CI in parallel * make tests automatically open/close playwright * fix parallel tests and screenshots * fix capturing screenshots for non-failing tests * cleanup * cleanup * format * log js errors * provide screenshots as artifacts * remove old scripts
31 lines
627 B
Bash
Executable File
31 lines
627 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
# Remove previous container if exists
|
|
docker rm -f linkding-postgres-test || true
|
|
|
|
# Run postgres container
|
|
docker run -d \
|
|
-e POSTGRES_DB=linkding \
|
|
-e POSTGRES_USER=linkding \
|
|
-e POSTGRES_PASSWORD=linkding \
|
|
-p 5432:5432 \
|
|
--name linkding-postgres-test \
|
|
postgres
|
|
|
|
# Wait until postgres has started
|
|
echo >&2 "$(date +%Y%m%dt%H%M%S) Waiting for postgres container"
|
|
sleep 15
|
|
|
|
# Run tests using postgres
|
|
export LD_DB_ENGINE=postgres
|
|
export LD_DB_USER=linkding
|
|
export LD_DB_PASSWORD=linkding
|
|
|
|
make test
|
|
make e2e
|
|
|
|
# Remove postgres container
|
|
docker rm -f linkding-postgres-test || true
|