Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 26 additions & 73 deletions .github/workflows/cypress-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,29 @@ env:
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/Cypress

jobs:
init:
cypress:
runs-on: ubuntu-latest
outputs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
npmVersion: ${{ steps.versions.outputs.npmVersion }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
server-versions: ['stable35']
containers: [1]
php-versions: ['8.3']

name: runner ${{ matrix.containers }}

services:
postgres:
image: ghcr.io/nextcloud/continuous-integration-postgres-16:latest # zizmor: ignore[unpinned-images]
ports:
- 4444:5432/tcp
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
POSTGRES_DB: nextcloud
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5

steps:
- name: Checkout server
Expand All @@ -45,15 +60,6 @@ jobs:
ref: ${{ matrix.server-versions }}
path: apps/viewer

- name: Checkout assistant
if: matrix.server-versions == 'main'
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/assistant
ref: main
path: apps/assistant

- name: Checkout app
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
Expand Down Expand Up @@ -83,63 +89,6 @@ jobs:
npm ci
TESTING=true npm run build --if-present

- name: Install node dependencies & build assistant app
if: matrix.server-versions == 'main'
working-directory: apps/assistant
run: |
composer install --no-dev
npm ci
npm run build

- name: Save context
uses: buildjet/cache/save@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
with:
key: cypress-context-${{ github.run_id }}
path: |
./

cypress:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: init

strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
php-versions: ['8.3']

name: runner ${{ matrix.containers }}

services:
postgres:
image: ghcr.io/nextcloud/continuous-integration-postgres-16:latest # zizmor: ignore[unpinned-images]
ports:
- 4444:5432/tcp
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
POSTGRES_DB: nextcloud
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5

steps:
- name: Restore context
uses: buildjet/cache/restore@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
with:
fail-on-cache-miss: true
key: cypress-context-${{ github.run_id }}
path: |
./

- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: 'npm'
node-version: ${{ needs.init.outputs.nodeVersion }}

- name: Set up npm ${{ needs.init.outputs.npmVersion }}
run: npm i -g 'npm@${{ needs.init.outputs.npmVersion }}'

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
with:
Expand All @@ -155,7 +104,11 @@ jobs:
PHP_CLI_SERVER_WORKERS: 10
run: |
mkdir data
echo '<?php $CONFIG=["memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php
echo '<?php $CONFIG=[' > config/config.php
echo '"memcache.local"=>"\OC\Memcache\APCu",' >> config/config.php
echo '"hashing_default_password"=>true,' >> config/config.php
echo '"log.condition"=>["apps"=>["text"]]' >> config/config.php
echo '];' >> config/config.php
php occ maintenance:install --verbose --database=pgsql --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 -f index.php
php -S 0.0.0.0:8081 &
Expand Down Expand Up @@ -210,12 +163,12 @@ jobs:

summary:
runs-on: ubuntu-latest-low
needs: [init, cypress]
needs: [cypress]

if: always()

name: cypress-summary

steps:
- name: Summary status
run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi
run: if ${{ ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi
85 changes: 0 additions & 85 deletions .github/workflows/playwright.yml

This file was deleted.

86 changes: 0 additions & 86 deletions cypress/e2e/Assistant.spec.js

This file was deleted.

Loading
Loading