Compare commits
1 Commits
v1.14.0
...
debug/cypr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c9d2e09a7 |
41
.github/workflows/cypress.yml
vendored
41
.github/workflows/cypress.yml
vendored
@@ -14,7 +14,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
cypress:
|
cypress:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ['ubuntu-latest', 'self-hosted']
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -22,9 +22,19 @@ jobs:
|
|||||||
node-version: [20.x]
|
node-version: [20.x]
|
||||||
# containers: [1, 2, 3]
|
# containers: [1, 2, 3]
|
||||||
php-versions: [ '8.1' ]
|
php-versions: [ '8.1' ]
|
||||||
databases: [ 'sqlite' ]
|
|
||||||
server-versions: [ 'master' ]
|
server-versions: [ 'master' ]
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
|
||||||
|
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:
|
steps:
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.2
|
uses: actions/setup-node@v4.0.2
|
||||||
@@ -76,9 +86,9 @@ jobs:
|
|||||||
PHP_CLI_SERVER_WORKERS: 10
|
PHP_CLI_SERVER_WORKERS: 10
|
||||||
run: |
|
run: |
|
||||||
mkdir data
|
mkdir data
|
||||||
php occ maintenance:install --verbose --database=${{ matrix.databases }} --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
|
echo '<?php $CONFIG=["memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php
|
||||||
php occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
|
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 occ config:system:set debug --value=true --type=boolean
|
php occ background:cron
|
||||||
php -f index.php
|
php -f index.php
|
||||||
php -S 0.0.0.0:8081 &
|
php -S 0.0.0.0:8081 &
|
||||||
export OC_PASS=1234561
|
export OC_PASS=1234561
|
||||||
@@ -90,20 +100,19 @@ jobs:
|
|||||||
composer install --no-dev
|
composer install --no-dev
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
cd ../../
|
|
||||||
curl -v http://localhost:8081/index.php/login
|
curl -v http://localhost:8081/index.php/login
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Run E2E cypress tests
|
||||||
uses: cypress-io/github-action@v6
|
run: |
|
||||||
with:
|
cd 'apps/${{ env.APP_NAME }}'
|
||||||
record: false
|
npx wait-on $CYPRESS_baseUrl
|
||||||
parallel: false
|
npx cypress run --record false --config defaultCommandTimeout=10000,video=false
|
||||||
wait-on: '${{ env.CYPRESS_baseUrl }}'
|
|
||||||
working-directory: 'apps/${{ env.APP_NAME }}'
|
|
||||||
config: defaultCommandTimeout=10000,video=false
|
|
||||||
env:
|
env:
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
# https://github.com/cypress-io/github-action/issues/124
|
||||||
npm_package_name: ${{ env.APP_NAME }}
|
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
|
||||||
|
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||||
|
npm_package_name: ${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Upload test failure screenshots
|
- name: Upload test failure screenshots
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user