-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Daniel Kesselberg <[email protected]>
- Loading branch information
Showing
2 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: PHPUnit nodb | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '!**.json' | ||
- 'package.json' | ||
- 'package-lock.json' | ||
- '!**.sh' | ||
- '!**.yml' | ||
- '!**.xml' | ||
- '!**.php' | ||
- '!**/tests/**' | ||
- '!3rdparty' | ||
- '!apps/theming/css' | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: phpunit-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
summary-nodb: | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
|
||
name: phpunit-nodb-summary | ||
|
||
steps: | ||
- name: Summary status | ||
run: 'echo "No PHP files changed, skipped PHPUnit"' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: PHPUnit nodb | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**.json' | ||
- '!package.json' | ||
- '!package-lock.json' | ||
- '**.sh' | ||
- '**.yml' | ||
- '**.xml' | ||
- '**.php' | ||
- '**/tests/**' | ||
- '3rdparty' | ||
- 'apps/theming/css' | ||
|
||
push: | ||
branches: | ||
- main | ||
- master | ||
- stable* | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: phpunit-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
phpunit-nodb: | ||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.repository_owner != 'nextcloud-gmbh' }} | ||
|
||
strategy: | ||
matrix: | ||
php-versions: ['8.0', '8.1', '8.2'] | ||
|
||
steps: | ||
- name: Checkout server | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
submodules: true | ||
|
||
- name: Install tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra | ||
- name: Set up php ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@9c77701ae57b0c47f6732beebfbdec76e4e5c90a #debian bookworm fix | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: apcu, ctype, curl, dom, fileinfo, gd, imagick, intl, json, ldap, mbstring, openssl, pcntl, pdo_sqlite, posix, redis, sqlite, xml, zip | ||
tools: phpunit:9 | ||
coverage: none | ||
ini-file: development | ||
ini-values: | ||
apc.enable_cli=on | ||
apc.enabled=on, | ||
disable_functions= # https://github.com/shivammathur/setup-php/discussions/573 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Nextcloud | ||
env: | ||
DB_PORT: 4444 | ||
run: | | ||
mkdir data | ||
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin | ||
php -f index.php | ||
- name: Enable additional apps | ||
run: ./occ app:enable admin_audit encryption federatedfilesharing federation files_sharing files_trashbin files_versions provisioning_api user_ldap | ||
|
||
- name: PHPUnit | ||
working-directory: tests | ||
# run: phpunit --configuration phpunit-autotest.xml --exclude-group DB,SLOWDB,PRIMARY-azure,PRIMARY-s3,PRIMARY-swift | ||
run: phpunit --configuration phpunit-autotest.xml --exclude-group DB,SLOWDB | ||
|
||
summary-nodb: | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
needs: phpunit-nodb | ||
|
||
if: always() | ||
|
||
name: phpunit-nodb-summary | ||
|
||
steps: | ||
- name: Summary status | ||
run: if ${{ needs.phpunit-nodb.result != 'success' }}; then exit 1; fi |