From 62fb3f73d3d375da46a7b1246a013d4df5e45c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 30 Jun 2026 08:26:29 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20replace=20Travis=20with=20GitHub=20Action?= =?UTF-8?q?s=20workflow=20for=20PHP=208.1=E2=80=938.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #8 Adds a GitHub Actions CI workflow running PHPUnit across a matrix of PHP 8.1 through 8.5 and removes the obsolete .travis.yml. Actions are pinned to full commit SHAs per the OSPO policy and use only GitHub-owned or Marketplace-verified actions (actions/checkout, shivammathur/setup-php — the latter already in use across the ownCloud org). Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ----------- 2 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..72757d3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + phpunit: + name: PHPUnit (PHP ${{ matrix.php-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: + - '8.1' + - '8.2' + - '8.3' + - '8.4' + - '8.5' + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Setup PHP + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 + with: + php-version: ${{ matrix.php-version }} + extensions: curl, json, mbstring + coverage: none + + - name: Validate composer.json + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run PHPUnit + run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 707be2a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: php -# Jammy Jellyfish environment has preinstalled PHP 8.1 -# Focal Fossa doesn't fit since it contains preinstalled PHP 7.4 only -# https://docs.travis-ci.com/user/reference/jammy/#php-support -dist: jammy -os: - - linux -php: - - 8.1 - - 8.2 -before_install: "composer install" -script: "vendor/bin/phpunit"