[PECL-CVS] [pecl-networking-gearman] master: Merge pull request #35 from esabol/add-ci-workflow

[email protected] (Rasmus Lerdorf via GitHub)
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Rasmus Lerdorf (rlerdorf)
Committer: GitHub (web-flow)
Pusher: rlerdorf
Date: 2025-08-11T18:23:31+02:00

Commit: https://github.com/php/pecl-networking-gearman/commit/6c6dd325f2b7a2ca6134ade19d83502e622bcbaf
Raw diff: https://github.com/php/pecl-networking-gearman/commit/6c6dd325f2b7a2ca6134ade19d83502e622bcbaf.diff

Merge pull request #35 from esabol/add-ci-workflow

Add GitHub Actions CI workflow

Changed paths:
  A  .github/workflows/ci.yml
  M  tests/gearman_worker_018.phpt


Diff:

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..1125fdf
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,65 @@
+name: Continuous Integration Tests
+on:
+  pull_request:
+    branches:
+      - master
+  push:
+    branches:
+      - master
+
+jobs:
+  build:
+    name: PHP ${{ matrix.version }} on ${{ matrix.os }}
+    runs-on: ${{ matrix.os }}
+    continue-on-error: ${{ !matrix.stable }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-latest, macos-latest]
+        version: ['8.0', '8.1', '8.2', '8.3']
+        stable: [true]
+        include:
+          - os: ubuntu-latest
+            version: '8.4'
+            stable: false
+          - os: macos-latest
+            version: '8.4'
+            stable: false
+    steps:
+      - name: Setup PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: ${{ matrix.version }}
+
+      - uses: actions/checkout@v4
+
+      - name: Install gearman on macOS
+        if: ${{ matrix.os == 'macos-latest' }}
+        run: brew install gearman
+
+      - name: Install gearman on Linux
+        if: ${{ matrix.os == 'ubuntu-latest' }}
+        run: sudo apt-get install libgearman-dev
+
+      - name: Run phpize
+        run: phpize
+
+      - name: Configure macOS
+        if: ${{ matrix.os == 'macos-latest' }}
+        run: ./configure --with-gearman=$(brew --prefix gearman)
+
+      - name: Configure Linux
+        if: ${{ matrix.os == 'ubuntu-latest' }}
+        run: ./configure --with-gearman
+
+      - name: Make extension
+        run: make
+
+      - name: Run tests
+        run: make test
+
+      - name: Install extension
+        run: sudo make install
+
+      - name: Check if installed correctly
+        run: php -dextension="gearman" -m | grep gearman
diff --git a/tests/gearman_worker_018.phpt b/tests/gearman_worker_018.phpt
index 9d329c7..fa7ec0e 100644
--- a/tests/gearman_worker_018.phpt
+++ b/tests/gearman_worker_018.phpt
@@ -1,7 +1,9 @@
 --TEST--
 GearmanWorker::enableExceptionHandler(),gearman_worker_enable_exception_handler()
 --SKIPIF--
-<?php if (!extension_loaded("gearman")) print "skip"; ?>
+<?php if (!extension_loaded("gearman")) print "skip";
+require_once('skipifconnect.inc');
+?>
 --FILE--
 <?php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.