Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,80 +214,6 @@ trigger:
- pull_request
- push

---
kind: pipeline
name: nodb

steps:
- name: submodules
image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest
commands:
- git submodule update --init
- name: nodb-php7.3
image: ghcr.io/nextcloud/continuous-integration-php7.3:php7.3-6
commands:
- bash tests/drone-run-php-tests.sh || exit 0
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
- name: nodb-php7.4
image: ghcr.io/nextcloud/continuous-integration-php7.4:php7.4-3
commands:
- bash tests/drone-run-php-tests.sh || exit 0
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
- name: nodb-php8.0
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
commands:
- bash tests/drone-run-php-tests.sh || exit 0
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite

services:
- name: cache
image: ghcr.io/nextcloud/continuous-integration-redis:latest

trigger:
branch:
- master
- stable*
event:
- pull_request
- push

---
kind: pipeline
name: sqlite

steps:
- name: submodules
image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest
commands:
- git submodule update --init
- name: sqlite-php7.3
image: ghcr.io/nextcloud/continuous-integration-php7.3:php7.3-6
commands:
- bash tests/drone-run-php-tests.sh || exit 0
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
- name: sqlite-php7.4
image: ghcr.io/nextcloud/continuous-integration-php7.4:php7.4-3
commands:
- bash tests/drone-run-php-tests.sh || exit 0
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
- name: sqlite-php8.0
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
commands:
- bash tests/drone-run-php-tests.sh || exit 0
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite

services:
- name: cache
image: ghcr.io/nextcloud/continuous-integration-redis:latest

trigger:
branch:
- master
- stable*
event:
- pull_request
- push

---
kind: pipeline
name: mariadb10.1-php7.3
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,60 @@ on: pull_request

jobs:
php-linters:
name: php${{ matrix.php-versions }} lint
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0']
name: php${{ matrix.php-versions }} lint

steps:
- name: Checkout
uses: actions/checkout@master

- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Lint
run: composer run lint

php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: 7.4
extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
tools: cs2pr

- name: Install dependencies
run: composer i

- name: Run coding standards check
run: |
composer run cs:check -- --format=checkstyle | cs2pr
composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
shell: bash

node:
name: eslint node${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

name: eslint node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

Expand Down
56 changes: 0 additions & 56 deletions .github/workflows/oci.yml

This file was deleted.

119 changes: 119 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: PHPUnit

on:
pull_request:
push:
branches:
- master
- stable*

env:
php-extensions: apcu,cli,ctype,curl,dom,fileinfo,gd,iconv,intl,json,ldap,mbstring,memcached,mysql,oci8,openssl,pdo_sqlite,pgsql,posix,redis,sqlite,xml,zip

jobs:
phpunit-nodb:
runs-on: ubuntu-20.04

strategy:
matrix:
php-versions: ["7.3", "7.4", "8.0"]

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
tools: phpunit:9.5.4
coverage: none

- name: PHPUnit
env:
NOCOVERAGE: true
TEST_SELECTION: NODB
run: bash autotest.sh sqlite

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "6379:6379"
memcached:
image: memcached
ports:
- "11211:11211"

phpunit-sqlite:
runs-on: ubuntu-20.04

strategy:
matrix:
php-versions: ["7.3", "7.4", "8.0"]

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
tools: phpunit:9.5.4
coverage: none

- name: PHPUnit
env:
NOCOVERAGE: true
run: bash autotest.sh sqlite

phpunit-oci8:
runs-on: ubuntu-20.04
# oci takes more time
needs: [phpunit-nodb, phpunit-sqlite]

strategy:
matrix:
php-versions: ["7.4"]

services:
oracle:
image: deepdiver/docker-oracle-xe-11g # "wnameless/oracle-xe-11g-r2"
ports:
- "1521:1521"

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
tools: phpunit:8.5.2
coverage: none

- name: Set up Nextcloud
run: |
mkdir data
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=1521 --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
php -f index.php

- name: PHPUnit
working-directory: tests
run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
2 changes: 1 addition & 1 deletion tests/lib/AppFramework/Bootstrap/CoordinatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function testBootAppNotLoadable(): void {
->with(\OCA\Settings\AppInfo\Application::class)
->willThrowException(new QueryException(""));
$this->logger->expects($this->once())
->method('logException');
->method('error');

$this->coordinator->bootApp($appId);
}
Expand Down
12 changes: 0 additions & 12 deletions tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ public function testRegisterCapability(): void {
$container->expects($this->once())
->method('registerCapability')
->with($name);
$this->logger->expects($this->never())
->method('logException');

$this->context->for('myapp')->registerCapability($name);
$this->context->delegateCapabilityRegistrations([
Expand All @@ -76,8 +74,6 @@ public function testRegisterEventListener(): void {
$dispatcher->expects($this->once())
->method('addServiceListener')
->with($event, $service, 0);
$this->logger->expects($this->never())
->method('logException');

$this->context->for('myapp')->registerEventListener($event, $service);
$this->context->delegateEventListenerRegistrations($dispatcher);
Expand All @@ -98,8 +94,6 @@ public function testRegisterService(bool $shared): void {
$container->expects($this->once())
->method('registerService')
->with($service, $factory, $shared);
$this->logger->expects($this->never())
->method('logException');

$this->context->for('myapp')->registerService($service, $factory, $shared);
$this->context->delegateContainerRegistrations([
Expand All @@ -117,8 +111,6 @@ public function testRegisterServiceAlias(): void {
$container->expects($this->once())
->method('registerAlias')
->with($alias, $target);
$this->logger->expects($this->never())
->method('logException');

$this->context->for('myapp')->registerServiceAlias($alias, $target);
$this->context->delegateContainerRegistrations([
Expand All @@ -136,8 +128,6 @@ public function testRegisterParameter(): void {
$container->expects($this->once())
->method('registerParameter')
->with($name, $value);
$this->logger->expects($this->never())
->method('logException');

$this->context->for('myapp')->registerParameter($name, $value);
$this->context->delegateContainerRegistrations([
Expand All @@ -154,8 +144,6 @@ public function testRegisterMiddleware(): void {
$container->expects($this->once())
->method('registerMiddleware')
->with($name);
$this->logger->expects($this->never())
->method('logException');

$this->context->for('myapp')->registerMiddleware($name);
$this->context->delegateMiddlewareRegistrations([
Expand Down
Loading