Merge pull request #269 from nextcloud/update-master-target-versions
Update master target versions
This commit is contained in:
commit
302e2fcb4c
|
|
@ -0,0 +1,55 @@
|
|||
name: PHP AppCode Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable*
|
||||
|
||||
env:
|
||||
APP_NAME: registration
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
server-versions: ['stable20', 'stable21', 'master']
|
||||
|
||||
name: AppCode check php${{ matrix.php-versions }}-${{ matrix.server-versions }}
|
||||
steps:
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- 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, sqlite, pdo_sqlite
|
||||
|
||||
- name: Checkout app
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: App code check
|
||||
run: php occ app:check-code ${{ env.APP_NAME }}
|
||||
|
|
@ -13,14 +13,14 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['7.2', '7.3', '7.4']
|
||||
php-versions: ['7.2', '7.3', '7.4', '8.0']
|
||||
|
||||
name: php${{ matrix.php-versions }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@v1
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
|
|
@ -29,18 +29,26 @@ jobs:
|
|||
run: composer run lint || ( echo 'Please run `composer run lint` and fix your code' && exit 1 )
|
||||
|
||||
php-cs-fixer:
|
||||
name: php-cs check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
|
||||
name: cs php${{ matrix.php-versions }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@master
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer i
|
||||
|
||||
- name: Run coding standards check
|
||||
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
|
||||
|
||||
|
|
@ -48,9 +56,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download schema
|
||||
run: wget https://apps.nextcloud.com/schema/apps/info.xsd
|
||||
|
||||
- name: Lint info.xml
|
||||
uses: ChristophWurst/xmllint-action@v1
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,287 @@
|
|||
name: PHPUnit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable*
|
||||
|
||||
env:
|
||||
APP_NAME: registration
|
||||
|
||||
jobs:
|
||||
php:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
# do not stop on another job's failure
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.3', '7.4']
|
||||
databases: ['sqlite']
|
||||
server-versions: ['stable20', 'stable21', 'master']
|
||||
include:
|
||||
- php-versions: '7.2'
|
||||
databases: 'sqlite'
|
||||
server-versions: 'stable20'
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
steps:
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- 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, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
|
||||
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=${{ matrix.databases }} --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
|
||||
php -f index.php
|
||||
./occ app:enable --force ${{ env.APP_NAME }}
|
||||
# php -S localhost:8080 &
|
||||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}/tests
|
||||
run: ../vendor/bin/phpunit -c phpunit.xml
|
||||
|
||||
# - name: PHPUnit integration
|
||||
# working-directory: apps/${{ env.APP_NAME }}
|
||||
# run: phpunit -c phpunit.integration.xml
|
||||
|
||||
mysql:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
# do not stop on another job's failure
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
databases: ['mysql']
|
||||
server-versions: ['master']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mariadb
|
||||
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:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- 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, iconv, fileinfo, intl, mysql, pdo_mysql
|
||||
tools: phpunit:8.5.2
|
||||
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=${{ matrix.databases }} --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
|
||||
php -f index.php
|
||||
./occ app:enable --force ${{ env.APP_NAME }}
|
||||
# php -S localhost:8080 &
|
||||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}/tests
|
||||
run: ../vendor/bin/phpunit -c phpunit.xml
|
||||
|
||||
# - name: PHPUnit integration
|
||||
# working-directory: apps/${{ env.APP_NAME }}
|
||||
# run: phpunit -c phpunit.integration.xml
|
||||
|
||||
pgsql:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
# do not stop on another job's failure
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
databases: ['pgsql']
|
||||
server-versions: ['master']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
ports:
|
||||
- 4444:5432/tcp
|
||||
env:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: rootpassword
|
||||
POSTGRES_DB: nextcloud
|
||||
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
|
||||
|
||||
steps:
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- 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, iconv, fileinfo, intl, pgsql, pdo_pgsql
|
||||
tools: phpunit:8.5.2
|
||||
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=${{ matrix.databases }} --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
|
||||
php -f index.php
|
||||
./occ app:enable --force ${{ env.APP_NAME }}
|
||||
# php -S localhost:8080 &
|
||||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}/tests
|
||||
run: ../vendor/bin/phpunit -c phpunit.xml
|
||||
|
||||
# - name: PHPUnit integration
|
||||
# working-directory: apps/${{ env.APP_NAME }}
|
||||
# run: phpunit -c phpunit.integration.xml
|
||||
|
||||
oci:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
# do not stop on another job's failure
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
databases: ['oci']
|
||||
server-versions: ['master']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
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:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- 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, iconv, fileinfo, intl, oci8
|
||||
tools: phpunit:8.5.2
|
||||
coverage: none
|
||||
|
||||
- name: Set up PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: composer i
|
||||
|
||||
- name: Set up Nextcloud
|
||||
run: |
|
||||
mkdir data
|
||||
./occ maintenance:install --verbose --database=${{ matrix.databases }} --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
|
||||
./occ app:enable --force ${{ env.APP_NAME }}
|
||||
# php -S localhost:8080 &
|
||||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}/tests
|
||||
run: ../vendor/bin/phpunit -c phpunit.xml
|
||||
|
||||
# - name: PHPUnit integration
|
||||
# working-directory: apps/${{ env.APP_NAME }}
|
||||
# run: phpunit -c phpunit.integration.xml
|
||||
56
.travis.yml
56
.travis.yml
|
|
@ -1,56 +0,0 @@
|
|||
sudo: false
|
||||
language: php
|
||||
php:
|
||||
- 7.3
|
||||
- 7.4
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache/files
|
||||
|
||||
services:
|
||||
- mysql
|
||||
- postgresql
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libxml2-utils
|
||||
|
||||
env:
|
||||
global:
|
||||
- APP_NAME=registration
|
||||
- CORE_BRANCH=master
|
||||
- DB=sqlite
|
||||
matrix:
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^stable\d+(\.\d+)?$/
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 7.3
|
||||
env: DB=mysql
|
||||
- php: 7.3
|
||||
env: DB=pgsql
|
||||
- php: 7.2
|
||||
env: CORE_BRANCH=stable20
|
||||
fast_finish: true
|
||||
|
||||
before_install:
|
||||
# XDebug is only needed if we report coverage -> speeds up other builds
|
||||
- if [[ "$PHP_COVERAGE" = "FALSE" ]]; then phpenv config-rm xdebug.ini; fi
|
||||
|
||||
install:
|
||||
- . ./tests/scripts/core-download.sh
|
||||
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/core-database.sh
|
||||
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/core-setup.sh
|
||||
|
||||
script:
|
||||
# Run app code checker but do not fail, as we have to use private API for now
|
||||
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/app-check-code.sh || true
|
||||
|
||||
# Run PHP tests
|
||||
- . ${BUILD_APP_MODULE_DIR}/tests/scripts/phpunit.sh
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.0",
|
||||
"christophwurst/nextcloud_testing": "0.10.0",
|
||||
"nextcloud/coding-standard": "^0.3.0"
|
||||
"nextcloud/coding-standard": "^0.5.0",
|
||||
"christophwurst/nextcloud_testing": "^0.12.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "travis_fold:start:app.check-code"
|
||||
|
||||
set -e
|
||||
|
||||
php -f ${BUILD_CORE_DIR}/occ app:check-code registration
|
||||
|
||||
echo "travis_fold:end:app.check-code"
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "travis_fold:start:core.database.setup"
|
||||
|
||||
set -e
|
||||
|
||||
# MySQL
|
||||
if [[ "${DB}" == 'mysql' ]]
|
||||
then
|
||||
mysql -u root -e 'CREATE DATABASE oc_autotest;'
|
||||
mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"
|
||||
mysql -u root -e "GRANT ALL ON oc_autotest.* TO 'oc_autotest'@'localhost';"
|
||||
fi
|
||||
|
||||
# Postgres
|
||||
if [[ "${DB}" == 'pgsql' ]]
|
||||
then
|
||||
psql -U postgres -c 'CREATE DATABASE oc_autotest;'
|
||||
psql -U postgres -c "CREATE USER oc_autotest WITH PASSWORD '';"
|
||||
psql -U postgres -c 'GRANT ALL PRIVILEGES ON DATABASE oc_autotest TO oc_autotest;'
|
||||
fi
|
||||
|
||||
echo "travis_fold:end:core.database.setup"
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "travis_fold:start:core.download"
|
||||
|
||||
set -e
|
||||
|
||||
# export some generic paths
|
||||
export BUILD_ROOT_DIR=$(dirname `pwd`)
|
||||
export BUILD_CORE_DIR="${BUILD_ROOT_DIR}/core"
|
||||
export BUILD_APPS_DIR="${BUILD_CORE_DIR}/apps"
|
||||
export BUILD_APP_MODULE_DIR="${BUILD_APPS_DIR}/registration"
|
||||
|
||||
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${CORE_BRANCH} ${BUILD_CORE_DIR}
|
||||
|
||||
mv ${BUILD_ROOT_DIR}/registration ${BUILD_APPS_DIR}
|
||||
|
||||
echo "travis_fold:end:core.download"
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "travis_fold:start:core.setup"
|
||||
|
||||
set -e
|
||||
|
||||
cd ${BUILD_CORE_DIR}
|
||||
|
||||
# Set up core
|
||||
php -f occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database ${DB} --database-pass=''
|
||||
|
||||
# Set up app
|
||||
php -f occ app:enable registration
|
||||
|
||||
# Enable app twice to check occ errors of registered commands
|
||||
php -f occ app:enable registration
|
||||
|
||||
echo "travis_fold:end:core.setup"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "travis_fold:start:phpunit"
|
||||
|
||||
set -e
|
||||
|
||||
cd ${BUILD_APP_MODULE_DIR}
|
||||
|
||||
composer install --prefer-dist --no-interaction -o
|
||||
vendor/bin/phpunit -c tests/phpunit.xml
|
||||
|
||||
echo "travis_fold:end:phpunit"
|
||||
Loading…
Reference in New Issue