Merge pull request #5860 from nextcloud/debug/cypress2

This commit is contained in:
Julius Härtl
2024-05-09 12:07:41 +02:00
committed by GitHub
3 changed files with 48 additions and 26 deletions

View File

@@ -14,16 +14,20 @@ env:
jobs: jobs:
cypress: cypress:
runs-on: ubuntu-latest runs-on: 'ubuntu-latest'
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node-version: [20.x] node-version: [20.x]
# containers: [1, 2, 3] # containers: [1, 2, 3]
php-versions: [ '8.1' ] php-versions: [ '8.2' ]
server-versions: [ 'master' ] server-versions: [ 'master' ]
env:
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
key: cache-v1
services: services:
postgres: postgres:
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
@@ -71,19 +75,39 @@ jobs:
ref: ${{ env.text_app_ref }} ref: ${{ env.text_app_ref }}
path: apps/text path: apps/text
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2.30.4 uses: shivammathur/setup-php@2.30.4
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu extensions: ${{ env.extensions }}
ini-values: ini-values:
apc.enable_cli=on apc.enable_cli=on
coverage: none coverage: none
- name: Install composer dependencies
working-directory: apps/${{ env.APP_NAME }}
run: |
composer install --no-dev
- name: Set up Nextcloud - name: Set up Nextcloud
env: env:
DB_PORT: 4444 DB_PORT: 4444
PHP_CLI_SERVER_WORKERS: 10 PHP_CLI_SERVER_WORKERS: 20
run: | run: |
mkdir data mkdir data
echo '<?php $CONFIG=["memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php echo '<?php $CONFIG=["memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php
@@ -96,23 +120,21 @@ jobs:
php occ user:add --password-from-env user2 php occ user:add --password-from-env user2
php occ app:enable deck php occ app:enable deck
php occ app:list php occ app:list
cd apps/deck
composer install --no-dev
npm ci
npm run build
curl -v http://localhost:8081/index.php/login curl -v http://localhost:8081/index.php/login
- name: Run E2E cypress tests - name: Cypress run
run: | uses: cypress-io/github-action@v6
cd 'apps/${{ env.APP_NAME }}' with:
npx wait-on $CYPRESS_baseUrl build: npm run dev
npx cypress run --record false --config defaultCommandTimeout=10000,video=false record: false
parallel: false
browser: chrome
wait-on: '${{ env.CYPRESS_baseUrl }}'
working-directory: 'apps/${{ env.APP_NAME }}'
config: defaultCommandTimeout=10000,video=false
env: env:
# https://github.com/cypress-io/github-action/issues/124 CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} npm_package_name: ${{ env.APP_NAME }}
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

14
package-lock.json generated
View File

@@ -55,7 +55,7 @@
"@relative-ci/agent": "^4.2.6", "@relative-ci/agent": "^4.2.6",
"@vue/test-utils": "^2.4.5", "@vue/test-utils": "^2.4.5",
"@vue/vue2-jest": "^29.2.6", "@vue/vue2-jest": "^29.2.6",
"cypress": "^13.7.2", "cypress": "^13.9.0",
"eslint-plugin-cypress": "^2.15.1", "eslint-plugin-cypress": "^2.15.1",
"eslint-webpack-plugin": "^4.1.0", "eslint-webpack-plugin": "^4.1.0",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -8887,9 +8887,9 @@
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
}, },
"node_modules/cypress": { "node_modules/cypress": {
"version": "13.7.2", "version": "13.9.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.2.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.9.0.tgz",
"integrity": "sha512-FF5hFI5wlRIHY8urLZjJjj/YvfCBrRpglbZCLr/cYcL9MdDe0+5usa8kTIrDHthlEc9lwihbkb5dmwqBDNS2yw==", "integrity": "sha512-atNjmYfHsvTuCaxTxLZr9xGoHz53LLui3266WWxXJHY7+N6OdwJdg/feEa3T+buez9dmUXHT1izCOklqG82uCQ==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
@@ -29556,9 +29556,9 @@
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
}, },
"cypress": { "cypress": {
"version": "13.7.2", "version": "13.9.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.2.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.9.0.tgz",
"integrity": "sha512-FF5hFI5wlRIHY8urLZjJjj/YvfCBrRpglbZCLr/cYcL9MdDe0+5usa8kTIrDHthlEc9lwihbkb5dmwqBDNS2yw==", "integrity": "sha512-atNjmYfHsvTuCaxTxLZr9xGoHz53LLui3266WWxXJHY7+N6OdwJdg/feEa3T+buez9dmUXHT1izCOklqG82uCQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/request": "^3.0.0", "@cypress/request": "^3.0.0",

View File

@@ -83,7 +83,7 @@
"@relative-ci/agent": "^4.2.6", "@relative-ci/agent": "^4.2.6",
"@vue/test-utils": "^2.4.5", "@vue/test-utils": "^2.4.5",
"@vue/vue2-jest": "^29.2.6", "@vue/vue2-jest": "^29.2.6",
"cypress": "^13.7.2", "cypress": "^13.9.0",
"eslint-plugin-cypress": "^2.15.1", "eslint-plugin-cypress": "^2.15.1",
"eslint-webpack-plugin": "^4.1.0", "eslint-webpack-plugin": "^4.1.0",
"jest": "^29.7.0", "jest": "^29.7.0",