memories/.github/workflows/e2e.yaml

235 lines
6.2 KiB
YAML
Raw Normal View History

name: e2e
on:
push:
branches:
- master
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
2022-10-29 23:16:13 +00:00
make patch-external
make build-js-production
zip -r vue.zip js/
2022-11-06 07:05:28 +00:00
- uses: actions/upload-artifact@v3
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']
server-versions: ['stable25']
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: |
2022-10-20 20:47:33 +00:00
./apps/memories/scripts/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: ['stable25']
services:
2022-10-10 23:45:18 +00:00
postgres:
image: postgres
ports:
- 4444:5432/tcp
env:
2022-11-15 05:32:41 +00:00
POSTGRES_DB: nextcloud
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: |
2022-10-20 20:47:33 +00:00
./apps/memories/scripts/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: ['stable25']
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: |
2022-10-20 20:47:33 +00:00
./apps/memories/scripts/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