No description
Find a file
Christoph Wurst 34b73d5b0e
chore: rebrand
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
2026-02-25 07:32:53 +01:00
.github Merge pull request #15 from ChristophWurst/renovate/actions-checkout-6.x 2026-01-23 18:57:28 +01:00
action.yml chore(deps): bump actions/setup-node action from v3 to v6 2026-01-23 17:55:37 +00:00
LICENSE Initial commit 2022-12-22 09:37:08 +01:00
README.md chore: rebrand 2026-02-25 07:32:53 +01:00

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. Default master.
  • Optional install: Run Nextcloud installation? Default 'false'.
  • Optional database: Database system to use for installation. mysql and postgres expect a running database running at 127.0.0.1 with database name, username and password set to nextcloud. Default sqlite.
  • Optional node-version Node.js version to set up, if any. Default 16. Pass false to skip Node.js installation.
  • Optional npm-version npm version override. Default default, uses the default npm that comes with the specified node.
  • Optional php-version PHP version to set up. Default 8.1. Pass false to skip PHP installation.
  • Optional php-coverage PHP coverage support, e.g. xdebug. Default false.
  • Optional patch-php-version-check Remove Nextcloud version check to allow nightly PHP versions. Default false.
  • Optional tools Additional 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