Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Mar 20, 2024
1 parent 588e56c commit 9ef00f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
matrix:
os:
- ubuntu-20.04

php:
- "7.2"
sphinx:
- "2.2.11"

steps:
- name: Checkout
Expand All @@ -48,16 +49,15 @@ jobs:
if: matrix.php == '8.0'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install sphinx
run: sh tests/data/actions/sphinx-setup-${{ matrix.sphinx }}.sh

- name: Setup source database
run: |
sh tests/data/actions/libmysqlclient20.sh
sudo systemctl start mysql.service
mysql -uroot -proot -e 'ALTER USER "root"@"localhost" IDENTIFIED WITH mysql_native_password BY "root";FLUSH PRIVILEGES;'
mysql -uroot -proot -e 'CREATE DATABASE `yiitest`;'
mysql --default-character-set=utf8 -D yiitest -uroot -proot < tests/data/source.sql
- name: Install sphinx
run: cd tests/data/actions && sh sphinx-setup.sh
sudo systemctl start mysql.service
mysql -uroot -proot -e 'ALTER USER "root"@"localhost" IDENTIFIED WITH mysql_native_password BY "root";FLUSH PRIVILEGES;'
mysql -uroot -proot -e 'CREATE DATABASE `yiitest`;'
mysql -D yiitest -uroot -proot < tests/data/source.sql
- name: Run tests with phpunit
if: matrix.php != '7.4'
Expand Down
6 changes: 0 additions & 6 deletions tests/data/actions/libmysqlclient20.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
SCRIPT=$(readlink -f "$0")
CWD=$(dirname "$SCRIPT")

# https://askubuntu.com/a/1337909
echo 'deb http://security.ubuntu.com/ubuntu xenial-security main' | sudo tee /etc/apt/sources.list.d/xenial-security.list
sudo apt update
sudo apt install libmysqlclient20

# install sphinx from https://sphinxsearch.com/downloads/release/
wget http://sphinxsearch.com/files/sphinxsearch_2.2.11-release-1~xenial_amd64.deb
sudo dpkg -i sphinxsearch_2.2.11-release-1~xenial_amd64.deb
Expand Down

0 comments on commit 9ef00f0

Please sign in to comment.