ci: update managed CI workflows from upstream #38
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 [ernolf] Raphael Gradenwitz <raphael.gradenwitz@googlemail.com> | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| name: PHPUnit | |
| on: pull_request | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: phpunit-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| php-versions: ${{ steps.versions.outputs.php-versions }} | |
| steps: | |
| - name: Checkout app | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Get version matrix | |
| id: versions | |
| uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 | |
| phpunit: | |
| runs-on: ubuntu-latest | |
| needs: matrix | |
| strategy: | |
| matrix: | |
| php-versions: ${{ fromJson(needs.matrix.outputs.php-versions) }} | |
| name: phpunit-php${{ matrix.php-versions }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up php ${{ matrix.php-versions }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite | |
| coverage: none | |
| ini-file: development | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install dependencies | |
| run: composer i | |
| - name: Run unit tests | |
| run: composer run test:unit | |
| summary: | |
| permissions: | |
| contents: none | |
| runs-on: ubuntu-latest | |
| needs: phpunit | |
| if: always() | |
| name: phpunit-summary | |
| steps: | |
| - name: Summary status | |
| run: if ${{ needs.phpunit.result != 'success' && needs.phpunit.result != 'skipped' }}; then exit 1; fi |