Test PostgreSQL in CI

This commit is contained in:
Jude Melton-Houghton 2022-10-19 17:58:36 -04:00 committed by Loïc Blot
parent aaa05f901a
commit f8c781b46c
2 changed files with 10 additions and 1 deletions

@ -29,6 +29,9 @@ on:
- 'Dockerfile' - 'Dockerfile'
- '.dockerignore' - '.dockerignore'
env:
MINETEST_POSTGRESQL_CONNECT_STRING: 'host=localhost user=minetest password=minetest dbname=minetest'
jobs: jobs:
# Older gcc version (should be close to our minimum supported version) # Older gcc version (should be close to our minimum supported version)
gcc_5: gcc_5:

@ -3,7 +3,7 @@
# Linux build only # Linux build only
install_linux_deps() { install_linux_deps() {
local pkgs=( local pkgs=(
cmake gettext cmake gettext postgresql
libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev
libsqlite3-dev libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libsqlite3-dev libhiredis-dev libogg-dev libgmp-dev libvorbis-dev
libopenal-dev libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev libopenal-dev libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev
@ -19,6 +19,12 @@ install_linux_deps() {
sudo apt-get update sudo apt-get update
sudo apt-get install -y --no-install-recommends "${pkgs[@]}" "$@" sudo apt-get install -y --no-install-recommends "${pkgs[@]}" "$@"
sudo systemctl start postgresql.service
sudo -u postgres psql <<<"
CREATE USER minetest WITH PASSWORD 'minetest';
CREATE DATABASE minetest;
"
} }
# macOS build only # macOS build only