forked from Shopify/shopify-api-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.yml
46 lines (45 loc) · 1.71 KB
/
dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: shopify-php-api
up:
- custom:
name: Add apt repository for php
met?: test -f /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
meet: sudo add-apt-repository -y ppa:ondrej/php
- custom:
name: Update apt
met?: 'apt-get update | grep -q "Reading package lists..."'
meet: sudo apt-get update
- custom:
name: Install PHP 8.2
met?: 'dpkg -l | grep -q "php8.2"'
meet: sudo apt-get install -y php8.2 libapache2-mod-php8.2 php8.2-cli php8.2-xml php8.2-cgi php8.2-zip
- custom:
name: Configure Ubuntu to use PHP 8.2
met?: 'php -v | grep -q "8.2"'
meet: sudo update-alternatives --set php /usr/bin/php8.2
- custom:
name: Configure Apache to use PHP 8.2
met?: test -f /etc/apache2/mods-enabled/php8.2.conf
meet: sudo a2dismod php8.1 && sudo a2enmod php8.2
- custom:
name: Configure ServerName in Apache2
met?: 'grep -q "ServerName 127.0.0.1" /etc/apache2/apache2.conf'
meet: echo "ServerName 127.0.0.1" | sudo tee -a
- custom:
name: Change Apache2 default port from 80 to 8123
met?: 'grep -q "Listen 8123" /etc/apache2/ports.conf'
meet: sudo sed -i 's/Listen 80/Listen 8123/' /etc/apache2/ports.conf
- custom:
name: Restart Apache2
met?: 'systemctl is-active --quiet apache2'
meet: sudo systemctl restart apache2
- custom:
name: Install composer
met?: 'which composer'
meet: curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
- custom:
name: Composer install
met?: 'composer install --dry-run 2>&1 | grep -q "Nothing to install"'
meet: composer install
commands:
test:
run: composer test