1name: Setup
2runs:
3  using: composite
4  steps:
5    - shell: bash
6      run: |
7        set -x
8
9        sudo service mysql start
10        sudo service postgresql start
11        sudo service slapd start
12        mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
13        # Ensure local_infile tests can run.
14        mysql -uroot -proot -e "SET GLOBAL local_infile = true"
15        sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
16        sudo -u postgres psql -c "CREATE DATABASE test;"
17        docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
18        sudo locale-gen de_DE
19
20        ./.github/scripts/setup-slapd.sh &>/dev/null
21
22        sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
23        sudo cp ext/snmp/tests/bigtest /etc/snmp
24        sudo service snmpd restart
25
26        sudo groupadd -g 5000 vmail
27        sudo useradd -m -d /var/vmail -s /bin/false -u 5000 -g vmail vmail
28        sudo cp ext/imap/tests/setup/dovecot.conf /etc/dovecot/dovecot.conf
29        sudo cp ext/imap/tests/setup/dovecotpass /etc/dovecot/dovecotpass
30        sudo service dovecot restart
31