mirror of
https://github.com/nextcloud/setup-server-action.git
synced 2026-03-25 09:12:32 +01:00
No description
|
|
||
|---|---|---|
| .github | ||
| action.yml | ||
| LICENSE | ||
| README.md | ||
Setup Nextcloud Github Action
Set up a Nextcloud environment. Batteries included, but removable.
Inputs
- 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.mysqlandpostgresexpect a running database running at 127.0.0.1 with database name, username and password set tonextcloud. Defaultsqlite. - Optional
node-versionNode.js version to set up, if any. Default16. Passfalseto skip Node.js installation. - Optional
npm-versionnpm version override. Defaultdefault, uses the default npm that comes with the specified node. - Optional
php-versionPHP version to set up. Default8.1. Passfalseto skip PHP installation. - Optional
php-coveragePHP coverage support, e.g.xdebug. Defaultfalse. - Optional
patch-php-version-checkRemove Nextcloud version check to allow nightly PHP versions. Defaultfalse. - Optional
toolsAdditional tools to install separated by space. Available:krankerl. Default''(no tools).
Usage
Set up environment for unit tests
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: nextcloud/setup-server-action@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
Set up environment for integration tests
These tests need an installed Nextcloud and PHP.
test-unit:
runs-on: ubuntu-latest
name: Unit tests
steps:
- name: Set up Nextcloud env
uses: nextcloud/setup-server-action@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
Set up environment for a full frontend and backend build
test-unit:
runs-on: ubuntu-latest
name: Unit tests
steps:
- name: Set up Nextcloud env
uses: nextcloud/setup-server-action@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