generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (52 loc) · 1.66 KB
/
run-macos.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Tests on macOS
on: [push, pull_request]
jobs:
test:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
continue-on-error: true
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install p7zip
brew install rar
brew install ghostscript
brew install imagemagick
shell: bash
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: imagick, zip, fileinfo, bz2
coverage: pcov
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Add rar extension
run: |
git clone https://github.com/cataphract/php-rar
cd php-rar
phpize
./configure
sudo make
sudo make install
pecl_path=$(pecl config-get ext_dir)
phpini_path=$(php -i | grep /.+/php.ini -oE)
sudo cp ./modules/rar.so $pecl_path
sudo echo "extension=rar.so" > $phpini_path
- name: Create .env file
run: |
cp .env.example .env
shell: bash
- name: Check extension rar
run: php -m | grep rar
- name: Check extension imagick
run: php -m | grep imagick
- name: Execute tests
run: vendor/bin/pest