Set up a Nextcloud environment. Batteries included, but removable.
- Optional
nextcloud-version
: Version tag or branch name to set up. Defaultmaster
. - Optional
install
: Run Nextcloud installation? Default'false'
. - Optional
database
: Database system to use for installation.mysql
andpostgres
expect a running database running at 127.0.0.1 with database name, username and password set tonextcloud
. Defaultsqlite
. - Optional
node-version
Node.js version to set up, if any. Default16
. Passfalse
to skip Node.js installation. - Optional
npm-version
npm version override. Defaultdefault
, uses the default npm that comes with the specified node. - Optional
php-version
PHP version to set up. Default8.1
. Passfalse
to skip PHP installation. - Optional
php-coverage
PHP coverage support, e.g.xdebug
. Defaultfalse
. - Optional
patch-php-version-check
Remove Nextcloud version check to allow nightly PHP versions. Defaultfalse
. - Optional
tools
Additional tools to install separated by space. Available:krankerl
. Default''
(no tools).
These tests only need the Nextcloud code and PHP.
test-unit:
runs-on: ubuntu-latest
name: Unit tests
steps:
- name: Set up Nextcloud env
uses: ChristophWurst/setup-nextcloud@v0.3.1
with:
nextcloud-version: stable25
php-version: '8.2'
node-version: 'false' # optional but speeds up the setup
- name: Checkout code
uses: actions/checkout@v2
with:
path: nextcloud/apps/my-app
- name: Install dependencies
run: composer install
- name: Run tests
run: composer run test:unit
These tests need an installed Nextcloud and PHP.
test-unit:
runs-on: ubuntu-latest
name: Unit tests
steps:
- name: Set up Nextcloud env
uses: ChristophWurst/setup-nextcloud@v0.3.1
with:
nextcloud-version: stable25
php-version: '8.1'
node-version: 'false' # optional but speeds up the setup
install: true
- name: Checkout code
uses: actions/checkout@v2
with:
path: nextcloud/apps/my-app
- name: Install dependencies
working-directory: nextcloud/apps/my-app
run: composer install
- name: Run tests
working-directory: nextcloud/apps/my-app
run: composer run test:integration
test-unit:
runs-on: ubuntu-latest
name: Unit tests
steps:
- name: Set up Nextcloud env
uses: ChristophWurst/setup-nextcloud@v0.3.1
with:
nextcloud-version: stable25
php-version: '8.1'
node-version: 18
install: true
tools: 'krankerl'
- name: Checkout code
uses: actions/checkout@v2
with:
path: nextcloud/apps/my-app
- name: Install dependencies
working-directory: nextcloud/apps/my-app
run: krankerl up
- name: Package app
working-directory: nextcloud/apps/my-app
run: krankerl package