236 lines
6.1 KiB
YAML
236 lines
6.1 KiB
YAML
|
name: e2e
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
- citest
|
||
|
|
||
|
env:
|
||
|
APP_NAME: memories
|
||
|
PHP_CLI_SERVER_WORKERS: 8
|
||
|
|
||
|
jobs:
|
||
|
vue:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Use Node.js
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 18.x
|
||
|
|
||
|
- name: Checkout the app
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Build vue app
|
||
|
run: |
|
||
|
make dev-setup
|
||
|
make build-js-production
|
||
|
zip -r vue.zip js/
|
||
|
|
||
|
- uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: vue.zip
|
||
|
path: vue.zip
|
||
|
|
||
|
mysql:
|
||
|
runs-on: ubuntu-latest
|
||
|
needs: vue
|
||
|
|
||
|
strategy:
|
||
|
# do not stop on another job's failure
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
php-versions: ['7.4', '8.1']
|
||
|
server-versions: ['v24.0.4']
|
||
|
|
||
|
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: Checkout server
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
submodules: true
|
||
|
repository: nextcloud/server
|
||
|
ref: ${{ matrix.server-versions }}
|
||
|
|
||
|
- name: Checkout the app
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
path: apps/${{ env.APP_NAME }}
|
||
|
|
||
|
- name: Use Node.js
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 18.x
|
||
|
|
||
|
- uses: actions/download-artifact@v2
|
||
|
with:
|
||
|
name: vue.zip
|
||
|
|
||
|
- name: Set up php ${{ matrix.php-versions }}
|
||
|
uses: shivammathur/setup-php@v2
|
||
|
with:
|
||
|
php-version: ${{ matrix.php-versions }}
|
||
|
tools: phpunit
|
||
|
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
|
||
|
coverage: none
|
||
|
|
||
|
- name: Set up Nextcloud
|
||
|
env:
|
||
|
DB_PORT: 4444
|
||
|
run: |
|
||
|
mkdir data
|
||
|
php 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 password
|
||
|
git clone --depth 1 --branch ${{ matrix.server-versions }} https://github.com/nextcloud/viewer apps/viewer
|
||
|
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
./apps/memories/ci-test.sh
|
||
|
|
||
|
- uses: actions/upload-artifact@v3
|
||
|
if: always()
|
||
|
with:
|
||
|
name: report-mysql-${{ matrix.php-versions }}-${{ matrix.server-versions }}
|
||
|
path: apps/${{ env.APP_NAME }}/playwright-report
|
||
|
|
||
|
|
||
|
pgsql:
|
||
|
runs-on: ubuntu-latest
|
||
|
needs: vue
|
||
|
|
||
|
strategy:
|
||
|
# do not stop on another job's failure
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
php-versions: ['7.4']
|
||
|
server-versions: ['v24.0.4']
|
||
|
|
||
|
services:
|
||
|
mysql:
|
||
|
image: postgres
|
||
|
ports:
|
||
|
- 4444:5432/tcp
|
||
|
env:
|
||
|
POSTGRES_PASSWORD: rootpassword
|
||
|
options: >-
|
||
|
--health-cmd pg_isready
|
||
|
--health-interval 10s
|
||
|
--health-timeout 5s
|
||
|
--health-retries 5
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout server
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
submodules: true
|
||
|
repository: nextcloud/server
|
||
|
ref: ${{ matrix.server-versions }}
|
||
|
|
||
|
- name: Checkout the app
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
path: apps/${{ env.APP_NAME }}
|
||
|
|
||
|
- name: Use Node.js
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 18.x
|
||
|
|
||
|
- uses: actions/download-artifact@v2
|
||
|
with:
|
||
|
name: vue.zip
|
||
|
|
||
|
- name: Set up php ${{ matrix.php-versions }}
|
||
|
uses: shivammathur/setup-php@v2
|
||
|
with:
|
||
|
php-version: ${{ matrix.php-versions }}
|
||
|
tools: phpunit
|
||
|
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
|
||
|
coverage: none
|
||
|
|
||
|
- name: Set up Nextcloud
|
||
|
env:
|
||
|
DB_PORT: 4444
|
||
|
run: |
|
||
|
mkdir data
|
||
|
php occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=postgres --database-pass=rootpassword --admin-user admin --admin-pass password
|
||
|
git clone --depth 1 --branch ${{ matrix.server-versions }} https://github.com/nextcloud/viewer apps/viewer
|
||
|
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
./apps/memories/ci-test.sh
|
||
|
|
||
|
- uses: actions/upload-artifact@v3
|
||
|
if: always()
|
||
|
with:
|
||
|
name: report-pgsql-${{ matrix.php-versions }}-${{ matrix.server-versions }}
|
||
|
path: apps/${{ env.APP_NAME }}/playwright-report
|
||
|
|
||
|
sqlite:
|
||
|
runs-on: ubuntu-latest
|
||
|
needs: vue
|
||
|
|
||
|
strategy:
|
||
|
# do not stop on another job's failure
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
php-versions: ['7.4']
|
||
|
server-versions: ['v24.0.4']
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout server
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
submodules: true
|
||
|
repository: nextcloud/server
|
||
|
ref: ${{ matrix.server-versions }}
|
||
|
|
||
|
- name: Checkout the app
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
path: apps/${{ env.APP_NAME }}
|
||
|
|
||
|
- name: Use Node.js
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 18.x
|
||
|
|
||
|
- uses: actions/download-artifact@v2
|
||
|
with:
|
||
|
name: vue.zip
|
||
|
|
||
|
- name: Set up php ${{ matrix.php-versions }}
|
||
|
uses: shivammathur/setup-php@v2
|
||
|
with:
|
||
|
php-version: ${{ matrix.php-versions }}
|
||
|
tools: phpunit
|
||
|
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
|
||
|
coverage: none
|
||
|
|
||
|
- name: Set up Nextcloud
|
||
|
env:
|
||
|
DB_PORT: 4444
|
||
|
run: |
|
||
|
mkdir data
|
||
|
php occ maintenance:install --verbose --admin-user admin --admin-pass password
|
||
|
git clone --depth 1 --branch ${{ matrix.server-versions }} https://github.com/nextcloud/viewer apps/viewer
|
||
|
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
./apps/memories/ci-test.sh
|
||
|
|
||
|
- uses: actions/upload-artifact@v3
|
||
|
if: always()
|
||
|
with:
|
||
|
name: report-sqlite-${{ matrix.php-versions }}-${{ matrix.server-versions }}
|
||
|
path: apps/${{ env.APP_NAME }}/playwright-report
|
||
|
|