diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index a3b995b31d5..6bf348bf3fa 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -8,10 +8,6 @@ on: - master - stable* -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true - env: APP_NAME: text CYPRESS_baseUrl: http://localhost:8081/index.php @@ -28,7 +24,7 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: repository: nextcloud/server - ref: ${{ matrix.server-versions }} + ref: master submodules: true - name: Checkout viewer @@ -122,11 +118,12 @@ jobs: PHP_CLI_SERVER_WORKERS: 10 run: | mkdir data - echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php + echo '0,"memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > 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 & export OC_PASS=1234561 + php occ background:cron php occ user:add --password-from-env user1 php occ user:add --password-from-env user2 php occ app:enable viewer @@ -161,9 +158,9 @@ jobs: - name: Upload nextcloud logs uses: actions/upload-artifact@v2 - if: failure() + if: always() with: - name: Upload nextcloud log + name: Upload nextcloud log ${{ matrix.containers }} path: data/nextcloud.log retention-days: 5 diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 988010b63f1..8e5da2382b8 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -28,10 +28,6 @@ on: permissions: contents: read -concurrency: - group: phpunit-mysql-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - jobs: phpunit-mysql: runs-on: ubuntu-latest diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 129f848cc69..b0b2fff38ed 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -28,10 +28,6 @@ on: permissions: contents: read -concurrency: - group: phpunit-oci-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - jobs: phpunit-oci: runs-on: ubuntu-22.04 diff --git a/cypress.config.js b/cypress.config.js index 7108e9ae8e8..9093b54157e 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -17,13 +17,13 @@ module.exports = defineConfig({ }, baseUrl: 'http://localhost:8081/index.php/', - experimentalSessionAndOrigin: true, specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + experimentalRunAllSpecs: true, }, retries: { - runMode: 2, + runMode: 0, // do not retry in `cypress open` openMode: 0, }, - "numTestsKeptInMemory": 5, + numTestsKeptInMemory: 5, }) diff --git a/cypress/fixtures/preview-service-worker.txt b/cypress/fixtures/preview-service-worker.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 7d695e5c7e1..8be45a6ad77 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -4,6 +4,16 @@ import './commands.js' import './sessions.js' import chaiExtension from './chai.js' +beforeEach(() => { + cy.intercept('GET', '**/preview-service-worker.js', { fixture: 'preview-service-worker.txt' }) +}) + before(() => { chai.use(chaiExtension) }) + +Cypress.on('window:before:load', (win) => { + // disable service workers + // eslint-disable-next-line + delete win.navigator.ServiceWorker +})