Skip to content

Commit f85a371

Browse files
committed
Update github actions
1 parent 8d6fe66 commit f85a371

File tree

4 files changed

+51
-82
lines changed

4 files changed

+51
-82
lines changed

.github/workflows/test-extension-compatibility.yml

+18-25
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,21 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
php:
15-
- '7.4'
15+
- '8.1'
1616
librdkafka:
17-
- 'v1.8.2'
17+
- 'v1.9.2'
1818
rdkafka:
19-
- '4.0.4'
20-
- '4.1.2'
21-
- '4.1.x'
22-
- '5.0.0'
23-
- '5.x'
24-
continue-on-error: ${{ matrix.rdkafka == '5.x' || matrix.rdkafka == '4.1.x' }}
19+
- '6.x'
2520
services:
2621
zookeeper:
27-
image: confluentinc/cp-zookeeper:6.2.1
22+
image: confluentinc/cp-zookeeper:7.3.1
2823
ports:
2924
- 2181:2181
3025
env:
3126
ZOOKEEPER_CLIENT_PORT: 2181
3227
ZOOKEEPER_TICK_TIME: 2000
3328
kafka:
34-
image: confluentinc/cp-kafka:6.2.1
29+
image: confluentinc/cp-kafka:7.3.1
3530
ports:
3631
- 9092:9092
3732
env:
@@ -51,14 +46,15 @@ jobs:
5146
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
5247
steps:
5348
- name: Checkout
54-
uses: actions/checkout@v2
49+
uses: actions/checkout@v3
5550

5651
- name: Cache librdkafka ${{ matrix.librdkafka }} build
5752
id: librdkafka-build-cache
58-
uses: actions/cache@v2
53+
uses: actions/cache@v3
5954
with:
6055
path: ~/build-cache/librdkafka
6156
key: ${{ runner.os }}-librdkafka-${{ matrix.librdkafka }}
57+
6258
- name: Build librdkafka ${{ matrix.librdkafka }}
6359
if: ${{ steps.librdkafka-build-cache.outputs.cache-hit != 'true' }}
6460
run: |
@@ -68,23 +64,27 @@ jobs:
6864
make
6965
mkdir -p ~/build-cache/librdkafka
7066
sudo make install DESTDIR=~/build-cache/librdkafka
67+
7168
- name: Install librdkafka ${{ matrix.librdkafka }}
7269
run: |
7370
sudo rsync -av ~/build-cache/librdkafka/ /
7471
sudo ldconfig
72+
7573
- name: Install PHP ${{ matrix.php }} with rdkafka ${{ matrix.rdkafka }}
7674
uses: shivammathur/setup-php@v2
7775
with:
7876
php-version: ${{ matrix.php }}
7977
coverage: none
8078
extensions: ffi
8179
tools: phpize
80+
8281
- name: Cache php-rdkafka ${{ matrix.rdkafka }} build
8382
id: php-rdkafka-build-cache
84-
uses: actions/cache@v2
83+
uses: actions/cache@v3
8584
with:
8685
path: ~/build-cache/php-rdkafka
8786
key: ${{ runner.os }}-php-rdkafka-${{ matrix.rdkafka }}
87+
8888
- name: Build php-rdkafka ${{ matrix.rdkafka }}
8989
if: ${{ steps.php-rdkafka-build-cache.outputs.cache-hit != 'true' }}
9090
run: |
@@ -95,23 +95,16 @@ jobs:
9595
make
9696
mkdir -p ~/build-cache/php-rdkafka
9797
cp ./modules/rdkafka.so ~/build-cache/php-rdkafka/
98+
9899
- name: Install php-rdkafka ${{ matrix.rdkafka }}
99100
run: |
100101
echo "extension=$HOME/build-cache/php-rdkafka/rdkafka.so"|sudo tee /etc/php/7.4/cli/conf.d/99-rdkafka.ini >/dev/null
101102
102-
- name: Get composer cache directory
103-
id: composer-cache
104-
run: |
105-
echo "::set-output name=dir::$(composer config cache-files-dir)"
106-
- name: Cache composer cache directory
107-
uses: actions/cache@v2
108-
with:
109-
path: ${{ steps.composer-cache.outputs.dir }}
110-
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
111-
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
112103
- name: Install dependencies
113-
run: |
114-
composer update --prefer-dist --prefer-stable --no-interaction --ignore-platform-req=ext-rdkafka
104+
uses: ramsey/composer-install@v2
105+
with:
106+
composer-options: "--prefer-dist --prefer-stable --no-interaction --ignore-platform-req=ext-rdkafka"
107+
115108
- name: Install dependencies for test-extension
116109
run: |
117110
composer update --prefer-dist --prefer-stable --no-interaction -d resources/test-extension

.github/workflows/test-macos.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ jobs:
1212
fail-fast: true
1313
matrix:
1414
php:
15-
- '7.4'
1615
- '8.0'
1716
- '8.1'
18-
continue-on-error: ${{ matrix.php == '8.1' }}
17+
- '8.2'
1918
defaults:
2019
run:
2120
shell: bash
@@ -27,7 +26,7 @@ jobs:
2726
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
2827
steps:
2928
- name: Checkout
30-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3130

3231
- name: Install latest librdkafka & kafka via brew
3332
shell: bash
@@ -48,19 +47,10 @@ jobs:
4847
coverage: none
4948
extensions: ffi, pcntl
5049

51-
- name: Get composer cache directory
52-
id: composer-cache
53-
run: |
54-
echo "::set-output name=dir::$(composer config cache-files-dir)"
55-
- name: Cache composer cache directory
56-
uses: actions/cache@v2
57-
with:
58-
path: ${{ steps.composer-cache.outputs.dir }}
59-
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
60-
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
6150
- name: Install dependencies
62-
run: |
63-
composer update --prefer-dist --prefer-stable --no-interaction
51+
uses: ramsey/composer-install@v2
52+
with:
53+
composer-options: "--prefer-dist --prefer-stable"
6454

6555
- name: Run tests
6656
run: |

.github/workflows/test-windows.yml

+10-20
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ jobs:
1212
fail-fast: true
1313
matrix:
1414
php:
15-
- '7.4'
1615
- '8.0'
1716
- '8.1'
17+
- '8.2'
1818
librdkafka:
19-
- '1.8.2'
20-
continue-on-error: ${{ matrix.php == '8.1' }}
19+
- '1.9.2'
2120
defaults:
2221
run:
2322
shell: bash
@@ -30,15 +29,15 @@ jobs:
3029
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
3130
steps:
3231
- name: Checkout
33-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3433

3534
- name: Install librdkafka & kafka
3635
run: |
3736
nuget install librdkafka.redist -Version ${{ matrix.librdkafka }}
3837
choco install --no-progress wget nssm
39-
wget -q -O kafka_2.13-3.0.0.tgz http://ftp.fau.de/apache/kafka/3.0.0/kafka_2.13-3.0.0.tgz
40-
tar -xzf kafka_2.13-3.0.0.tgz
41-
cp -pr kafka_2.13-3.0.0 /c/kafka
38+
wget -q -O kafka_2.13-3.3.2.tgz http://ftp.fau.de/apache/kafka/3.3.2/kafka_2.13-3.3.2.tgz
39+
tar -xzf kafka_2.13-3.3.2.tgz
40+
cp -pr kafka_2.13-3.3.2 /c/kafka
4241
sed -i "s|broker.id=0|broker.id=111|g" /c/kafka/config/server.properties
4342
nssm install zookeeper /c/kafka/bin/windows/zookeeper-server-start.bat /c/kafka/config/zookeeper.properties
4443
nssm set zookeeper AppExit Default Exit
@@ -59,23 +58,14 @@ jobs:
5958
coverage: none
6059
extensions: ffi
6160

62-
- name: Get composer cache directory
63-
id: composer-cache
64-
run: |
65-
echo "::set-output name=dir::$(composer config cache-files-dir)"
66-
- name: Cache composer cache directory
67-
uses: actions/cache@v2
68-
with:
69-
path: ${{ steps.composer-cache.outputs.dir }}
70-
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
71-
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
7261
- name: Install dependencies
73-
run: |
74-
composer update --prefer-dist --prefer-stable --no-interaction
62+
uses: ramsey/composer-install@v2
63+
with:
64+
composer-options: "--prefer-dist --prefer-stable"
7565

7666
- name: Run tests
7767
run: |
78-
export PATH=$PWD/librdkafka.redist.1.8.2/runtimes/win-x64/native:$PATH
68+
export PATH=$PWD/librdkafka.redist.${{ matrix.librdkafka }}/runtimes/win-x64/native:$PATH
7969
composer test-init
8070
vendor/bin/phpunit --verbose --debug;
8171

.github/workflows/test.yml

+18-22
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
- php: '7.4'
16-
librdkafka: 'v1.8.2'
15+
- php: '8.0'
16+
librdkafka: 'v1.9.2'
1717
publish: true
1818
exclude:
19-
- php: '7.4'
20-
librdkafka: 'v1.8.2'
19+
- php: '8.0'
20+
librdkafka: 'v1.9.2'
2121
publish: false
2222
php:
2323
- '7.4'
2424
- '8.0'
2525
- '8.1'
26+
- '8.2'
2627
librdkafka:
28+
- 'v1.9.2'
2729
- 'v1.8.2'
2830
- 'v1.7.0'
2931
- 'v1.6.2'
@@ -36,17 +38,17 @@ jobs:
3638
- 'master'
3739
publish:
3840
- false
39-
continue-on-error: ${{ matrix.php == '8.1' || matrix.librdkafka == 'master' }}
41+
continue-on-error: ${{ matrix.librdkafka == 'master' }}
4042
services:
4143
zookeeper:
42-
image: confluentinc/cp-zookeeper:6.2.1
44+
image: confluentinc/cp-zookeeper:7.3.1
4345
ports:
4446
- 2181:2181
4547
env:
4648
ZOOKEEPER_CLIENT_PORT: 2181
4749
ZOOKEEPER_TICK_TIME: 2000
4850
kafka:
49-
image: confluentinc/cp-kafka:6.2.1
51+
image: confluentinc/cp-kafka:7.3.1
5052
ports:
5153
- 9092:9092
5254
env:
@@ -66,14 +68,15 @@ jobs:
6668
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6769
steps:
6870
- name: Checkout
69-
uses: actions/checkout@v2
71+
uses: actions/checkout@v3
7072

7173
- name: Cache librdkafka ${{ matrix.librdkafka }} build
7274
id: librdkafka-build-cache
73-
uses: actions/cache@v2
75+
uses: actions/cache@v3
7476
with:
7577
path: ~/build-cache/librdkafka
7678
key: ${{ runner.os }}-librdkafka-${{ matrix.librdkafka }}
79+
7780
- name: Build librdkafka ${{ matrix.librdkafka }}
7881
if: ${{ steps.librdkafka-build-cache.outputs.cache-hit != 'true' }}
7982
run: |
@@ -83,30 +86,23 @@ jobs:
8386
make
8487
mkdir -p ~/build-cache/librdkafka
8588
sudo make install DESTDIR=~/build-cache/librdkafka
89+
8690
- name: Install librdkafka ${{ matrix.librdkafka }}
8791
run: |
8892
sudo rsync -av ~/build-cache/librdkafka/ /
8993
sudo ldconfig
94+
9095
- name: Install PHP ${{ matrix.php }}
9196
uses: shivammathur/setup-php@v2
9297
with:
9398
php-version: ${{ matrix.php }}
9499
coverage: pcov
95100
extensions: ffi, pcntl
96101

97-
- name: Get composer cache directory
98-
id: composer-cache
99-
run: |
100-
echo "::set-output name=dir::$(composer config cache-files-dir)"
101-
- name: Cache composer cache directory
102-
uses: actions/cache@v2
103-
with:
104-
path: ${{ steps.composer-cache.outputs.dir }}
105-
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
106-
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
107102
- name: Install dependencies
108-
run: |
109-
composer update --prefer-dist --prefer-stable --no-interaction
103+
uses: ramsey/composer-install@v2
104+
with:
105+
composer-options: "--prefer-dist --prefer-stable"
110106

111107
- name: Run tests
112108
run: |
@@ -115,7 +111,7 @@ jobs:
115111
116112
- name: Publish code coverage to codeclimate
117113
if: matrix.publish == true && github.event_name == 'push'
118-
uses: paambaati/codeclimate-action@v2.7.4
114+
uses: paambaati/codeclimate-action@v3.2.0
119115
env:
120116
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
121117

0 commit comments

Comments
 (0)