Skip to content

Commit

Permalink
Merge pull request #1467 from nextcloud/feat/cypress-faster-without-pull
Browse files Browse the repository at this point in the history
Do not pull from the github workflow
  • Loading branch information
skjnldsv authored Nov 15, 2022
2 parents 648ed24 + 9deaef3 commit aaeab95
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ jobs:
key: cypress-context-${{ github.run_id }}
path: /home/runner/work/viewer

- name: Pull server image
run: docker pull ghcr.io/nextcloud/continuous-integration-shallow-server

- name: Run E2E cypress tests
uses: cypress-io/github-action@v4
with:
Expand Down
15 changes: 13 additions & 2 deletions cypress/dockerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,19 @@ const SERVER_IMAGE = 'ghcr.io/nextcloud/continuous-integration-shallow-server'
export const startNextcloud = async function (branch: string = 'master'): Promise<any> {
try {
// Pulling images
console.log('Pulling images...')
await docker.pull(SERVER_IMAGE)
console.log('Pulling images... ⏳')
await new Promise((resolve, reject): any => docker.pull(SERVER_IMAGE, (err, stream) => {
// https://github.com/apocas/dockerode/issues/357
docker.modem.followProgress(stream, onFinished)
function onFinished(err, output) {
if (!err) {
resolve(true)
return
}
reject(err)
}
}))
console.log(`└─ Done`)

// Getting latest image
console.log('\nChecking running containers... 🔍')
Expand Down

0 comments on commit aaeab95

Please sign in to comment.