Skip to content

ChristophWurst/setup-nextcloud

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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: 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

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: 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

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: 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

About

Github action to set up a Nextcloud environment for CI

Resources

License

Stars

Watchers

Forks

Packages

No packages published