-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (58 loc) · 1.75 KB
/
test-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
65
66
name: Build macOS
on:
push:
pull_request:
jobs:
tests-macos:
name: Tests
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
defaults:
run:
shell: bash
env:
PHP_VERSION: ${{ matrix.php }}
KAFKA_BROKERS: localhost:9092
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
LIBRDKAFKA_LIBRARY_PATH: /opt/homebrew/lib/librdkafka.dylib
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest librdkafka & kafka via brew
shell: bash
run: |
brew update
brew install librdkafka kafka
- name: Start Kafka
shell: bash
run: |
zookeeper-server-start -daemon /usr/local/etc/kafka/zookeeper.properties;
kafka-server-start -daemon /usr/local/etc/kafka/server.properties --override broker.id=111 --override advertised.listeners=${{ env.KAFKA_ADVERTISED_LISTENERS }};
- name: Install PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: ffi, pcntl
ini-values: "${{ (matrix.php == '8.3' || matrix.php == '8.4') && 'zend.max_allowed_stack_size=256k' || '' }}"
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--prefer-dist --prefer-stable"
- name: Run tests
run: |
composer test-init
composer test
- name: Stop kafka
run: |
kafka-server-stop;
zookeeper-server-stop;