From ab2bb53ff2ec5b4236de976a685069f75059f5e7 Mon Sep 17 00:00:00 2001 From: Zachary Klosko Date: Wed, 16 Dec 2020 14:37:06 -0500 Subject: [PATCH] Adding back PHP and Postgres actions --- .github/scripts/init-postgres.sh | 6 +++ .../scripts/{install.sh => install-bionic.sh} | 13 ++++++- .github/scripts/install-xenial.sh | 39 +++++++++++++++++++ .github/workflows/test-all-Ubuntu.yml | 5 ++- 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .github/scripts/init-postgres.sh rename .github/scripts/{install.sh => install-bionic.sh} (76%) create mode 100644 .github/scripts/install-xenial.sh diff --git a/.github/scripts/init-postgres.sh b/.github/scripts/init-postgres.sh new file mode 100644 index 000000000..03069d5ac --- /dev/null +++ b/.github/scripts/init-postgres.sh @@ -0,0 +1,6 @@ +#/bin/bash + +psql -c 'CREATE DATABASE libretime;' -U postgres +psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" -U postgres +psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' -U postgres +psql -c 'ALTER USER libretime CREATEDB;' -U postgres \ No newline at end of file diff --git a/.github/scripts/install.sh b/.github/scripts/install-bionic.sh similarity index 76% rename from .github/scripts/install.sh rename to .github/scripts/install-bionic.sh index 98d8917a8..3dc548843 100644 --- a/.github/scripts/install.sh +++ b/.github/scripts/install-bionic.sh @@ -22,7 +22,18 @@ apt-get install -y gstreamer1.0-plugins-base \ python3-gi-cairo \ python-cairo \ pkg-config \ - libcairo2-dev + libcairo2-dev \ + postgresql \ + postgresql-client + +apt-get install -y php7.2 \ + php7.2-curl \ + php7.2-gd \ + php7.2-pgsql \ + php-apcu \ + php-bcmath \ + php-mbstring \ + php-pear # Making directory; not sure why... mkdir -p /tmp/log/libretime \ No newline at end of file diff --git a/.github/scripts/install-xenial.sh b/.github/scripts/install-xenial.sh new file mode 100644 index 000000000..60412b82c --- /dev/null +++ b/.github/scripts/install-xenial.sh @@ -0,0 +1,39 @@ +#/bin/bash + +# Adding repos and packages +add-apt-repository -y ppa:libretime/libretime +apt-get -q update +apt-get install -y gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + libgirepository1.0-dev \ + liquidsoap \ + liquidsoap-plugin-faad \ + liquidsoap-plugin-lame \ + liquidsoap-plugin-mad \ + liquidsoap-plugin-vorbis \ + python3-gst-1.0 \ + silan \ + gcc \ + gir1.2-gtk-3.0 \ + python3-setuptools \ + python3-gi \ + python3-gi-cairo \ + python-cairo \ + pkg-config \ + libcairo2-dev \ + postgresql \ + postgresql-client + +apt-get install -y php7.0 \ + php7.0-curl \ + php7.0-gd \ + php7.0-pgsql \ + php-apcu \ + php-bcmath \ + php-mbstring \ + php-pear + +# Making directory; not sure why... +mkdir -p /tmp/log/libretime \ No newline at end of file diff --git a/.github/workflows/test-all-Ubuntu.yml b/.github/workflows/test-all-Ubuntu.yml index 1a5d88e5a..b837ae615 100644 --- a/.github/workflows/test-all-Ubuntu.yml +++ b/.github/workflows/test-all-Ubuntu.yml @@ -18,9 +18,10 @@ jobs: with: python-version: '3.6' - run: ENVIRONMENT=testing && LIBRETIME_LOG_DIR=/tmp/log/libretime - - run: sudo bash ./.github/scripts/install.sh + - run: sudo bash ./.github/scripts/install-bionic.sh + - run: sudo bash ./.github/scripts/init-postgres.sh - run: sudo composer install - - run: cd airtime_mvc/tests && sudo bash ../../vendor/bin/phpunit + - run: cd airtime_mvc/tests && sudo bash ../../vendor/bin/phpunit && cd ../.. - run: sudo bash ./.github/scripts/python-pkg-install.sh - run: sudo bash ./.github/scripts/python-pkg-test.sh # test-xenial: