Skip to content

Fix missing device columns when migrating from <1.0 #275

Fix missing device columns when migrating from <1.0

Fix missing device columns when migrating from <1.0 #275

Workflow file for this run

name: phpunit-mysql
on:
push:
branches: [ main, test ]
paths:
- .github/workflows/phpunit.yml
- appinfo/**
- composer.*
- lib/**
- templates/**
- tests/**
pull_request:
branches: [ main ]
paths:
- .github/workflows/phpunit.yml
- appinfo/**
- composer.*
- lib/**
- templates/**
- tests/**
env:
APP_ID: phonetrack
jobs:
tests:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4']
server-versions: ['stable30', 'stable31', 'stable32', 'master']
exclude:
- php-versions: 8.4
server-versions: stable30
name: php${{ matrix.php-versions }}-mysql-${{ matrix.server-versions }}
services:
mysql:
image: mariadb:10.5
ports:
- 4444:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
steps:
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
coverage: none
ini-file: development
# Temporary workaround for missing pcntl_* in PHP 8.3
ini-values: disable_functions=
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Nextcloud
run: |
export DEBIAN_FRONTEND=noninteractive
#sudo apt update -y
#sudo apt install python3-pip git sudo unzip curl wget make rsync -y
mkdir -p ~/html
echo "git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud"
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud
cp -r $GITHUB_WORKSPACE ~/html/nextcloud/apps/${{ env.APP_ID }}
# SETUP NEXTCLOUD
export DB_PORT=4444
echo "php ~/html/nextcloud/occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin"
php ~/html/nextcloud/occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
php ~/html/nextcloud/occ app:enable --force ${{ env.APP_ID }}
php ~/html/nextcloud/occ app:enable files_external
php ~/html/nextcloud/occ maintenance:mode --off
echo "##### App is installed"
cd ~/html/nextcloud/apps/${{ env.APP_ID }}
composer i
- name: Perform PhpUnit tests
#if: ${{ !(matrix.databases == 'sqlite' && matrix.php-versions == '8.3' && matrix.server-versions == 'master') }}
run: |
cd ~/html/nextcloud/apps/${{ env.APP_ID }}
composer run test:unit && SUCCESS=yes || SUCCESS=no
if [ $SUCCESS = "yes" ]; then echo "TESTS PASSED"; else echo "TESTS FAILED"; exit 1; fi