Skip to content

chore: update workflows from templates #161

chore: update workflows from templates

chore: update workflows from templates #161

Workflow file for this run

name: Setup
on: pull_request
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1']
nextcloud-versions: ['master']
db: ['mysql', 'sqlite', 'pgsql']
include:
- php-versions: '8.0'
db: 'pgsql'
nextcloud-versions: stable26
- php-versions: '8.2'
db: 'sqlite'
nextcloud-versions: stable27
- php-versions: '8.3'
db: 'sqlite'
nextcloud-versions: master
name: Nextcloud ${{ matrix.nextcloud-versions }} php${{ matrix.php-versions }} ${{ matrix.db }} setup testing
services:
mail-service:
image: ghcr.io/christophwurst/docker-imap-devel:latest
env:
MAILNAME: mail.domain.tld
MAIL_ADDRESS: user@domain.tld
MAIL_PASS: mypassword
ports:
- 25:25
- 143:143
- 993:993
- 4190:4190
mysql-service:
image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest
env:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres-service:
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
env:
POSTGRES_USER: nextcloud
POSTGRES_DB: nextcloud
POSTGRES_PASSWORD: nextcloud
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp
coverage: xdebug
- name: Checkout Nextcloud
run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
- name: Patch version check for nightly PHP
if: ${{ matrix.php-versions == '8.2' }}
run: echo "<?php" > nextcloud/lib/versioncheck.php
- name: Install Nextcloud
run: php -f nextcloud/occ maintenance:install --database-host 127.0.0.1 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user admin --admin-pass admin --database ${{ matrix.db }}
- name: Checkout Calendar Resource Management
uses: actions/checkout@master
with:
path: nextcloud/apps/calendar_resource_management
- name: Install dependencies
working-directory: nextcloud/apps/calendar_resource_management
run: composer i
- name: Enable the app
run: php -f nextcloud/occ app:enable calendar_resource_management
- name: Create Resources
run: |
php -f nextcloud/occ calendar-resource:building:create --address='Amadeus Way, Gotham NG11 0AS' --description='Elizabeth Arkham Asylum for the Criminally Insane' --wheelchair-accessible=false 'Arkham Asylum'
php -f nextcloud/occ calendar-resource:story:create 1 '1st floor'
php -f nextcloud/occ calendar-resource:story:create 1 '2nd floor'
php -f nextcloud/occ calendar-resource:room:create --contact-person-user-id='amadeus' --capacity=10 --room-number=404 --has-phone=true --has-video-conferencing=true --has-tv=false --has-projector=false --has-whiteboard=false --wheelchair-accessible=false 1 arkham_meeting_1 'The Joker' joker@arkham-asylum.com 'meeting-room'
php -f nextcloud/occ calendar-resource:room:create 2 arkham_meeting_2 'Bane' bane@arkham-asylum.com 'other'
summary:
runs-on: ubuntu-latest
needs:
- setup
if: always()
name: Setup summary
steps:
- name: Setup test status
run: if ${{ needs.setup.result != 'success' && needs.setup.result != 'skipped' }}; then exit 1; fi