Skip to content

Commit

Permalink
Merge pull request #4847 from nextcloud/ci/cypress-split
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Oct 13, 2023
2 parents 6ee5636 + ee6aa83 commit 02e58ff
Show file tree
Hide file tree
Showing 5 changed files with 1,914 additions and 59 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,6 @@ jobs:
server-versions: [ 'master' ]
run-in-parallel:
- false # only for PRs: ${{ !!github.head_ref }}
exclude:
- run-in-parallel: false
containers: 2
- run-in-parallel: false
containers: 3
- run-in-parallel: false
containers: 4
- run-in-parallel: false
containers: 5
- run-in-parallel: false
containers: 6
- run-in-parallel: false
containers: 7
- run-in-parallel: false
containers: 8

name: runner ${{ matrix.containers }}

Expand Down Expand Up @@ -174,6 +159,9 @@ jobs:
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
npm_package_name: ${{ env.APP_NAME }}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}


- name: Upload test failure screenshots
uses: actions/upload-artifact@v2
Expand Down
14 changes: 14 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
const { defineConfig } = require('cypress')
const cypressSplit = require('cypress-split')

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// IMPORTANT: return the config object
return config
},
},
})

module.exports = defineConfig({
projectId: 'hx9gqy',
viewportWidth: 1280,
viewportHeight: 900,
e2e: {
setupNodeEvents(on, config) {
cypressSplit(on, config)

const browserify = require('@cypress/browserify-preprocessor')
const webpack = require('@cypress/webpack-preprocessor')
const webpackOptions = require('@nextcloud/webpack-vue-config')
Expand All @@ -14,6 +26,8 @@ module.exports = defineConfig({

on('file:preprocessor', browserify())
on('file:preprocessor', webpack({ webpackOptions }))

return config
},

baseUrl: 'http://localhost:8081/index.php/',
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/nodes/CodeBlock.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Front matter support', function() {
})
})

it.only('Show a code block in a public read only link', function() {
it('Show a code block in a public read only link', function() {
cy.shareFile('/codeblock.md')
.then((token) => {
cy.logout()
Expand Down
Loading

0 comments on commit 02e58ff

Please sign in to comment.