Skip to content
Merged
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
26 changes: 0 additions & 26 deletions .drone.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/lint-info-xml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint

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

jobs:
xml-linters:
runs-on: ubuntu-latest

name: info.xml lint
steps:
- name: Checkout
uses: actions/checkout@master

- name: Download schema
run: wget https://github.com/nextcloud/server/master/resources/app-info-shipped.xsd

- name: Lint info.xml
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./app-info-shipped.xsd
35 changes: 35 additions & 0 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint

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

jobs:
lint:
runs-on: ubuntu-latest

name: php-cs

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

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
coverage: none

- name: Install dependencies
run: composer i

- name: Lint
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
73 changes: 0 additions & 73 deletions .github/workflows/oci.yml

This file was deleted.

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

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

env:
APP_NAME: firstrunwizard
# Location of the phpunit.xml and phpunit.integration.xml files
# Comment to disable
PHPUNIT_CONFIG: ./tests/phpunit.xml
# PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml

jobs:
phpunit-mysql:
runs-on: ubuntu-latest

strategy:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
server-versions: ['master']

services:
mysql:
image: mariadb:10.5
ports:
- 4444:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@v2
with:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
coverage: none

- name: Set up PHPUnit
working-directory: apps/${{ env.APP_NAME }}
run: composer i

- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable --force ${{ env.APP_NAME }}
php -S localhost:8080 &

- name: PHPUnit
# Only run if phpunit config file exists
if: env.PHPUNIT_CONFIG != ''
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: PHPUnit integration
# Only run if phpunit integration config file exists
if: env.PHPUNIT_INTEGRATION_CONFIG != ''
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

summary:
runs-on: ubuntu-latest
needs: phpunit-mysql

if: always()

name: phpunit-mysql-summary

steps:
- name: Summary status
run: if ${{ needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
90 changes: 90 additions & 0 deletions .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: PHPUnit

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

env:
APP_NAME: firstrunwizard
# Location of the phpunit.xml and phpunit.integration.xml files
# Comment to disable
PHPUNIT_CONFIG: ./tests/phpunit.xml
# PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml

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

strategy:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.0']
server-versions: ['master']

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

steps:
- name: Checkout server
uses: actions/checkout@v2
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@v2
with:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, oci8
tools: phpunit
coverage: none

- name: Set up PHPUnit
working-directory: apps/${{ env.APP_NAME }}
run: composer i

- name: Set up Nextcloud
env:
DB_PORT: 1521
run: |
mkdir data
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
./occ app:enable --force ${{ env.APP_NAME }}
php -S localhost:8080 &

- name: PHPUnit
# Only run if phpunit config file exists
if: env.PHPUNIT_CONFIG != ''
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: PHPUnit integration
# Only run if phpunit integration config file exists
if: env.PHPUNIT_INTEGRATION_CONFIG != ''
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

summary:
runs-on: ubuntu-latest
needs: phpunit-oci

if: always()

name: phpunit-oci-summary

steps:
- name: Summary status
run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi
Loading