moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
409 stars 250 forks source link

Automated testing for moodle-docker-compose.cmd #56

Open danpoltawski opened 7 years ago

danpoltawski commented 7 years ago

I did some experiments using appveyor to test this project on windows - but appveyor sadly doesn't support the docker environment.

But moodle-docker-compose.cmd still gives me the spooks because I (and i'm sure many contributors) aren't working on windows with batch scripts much.

I suggest that we create some test for the script - perhaps with a fake docker-compose fixture which echos flags and we can test the output to make sure it's doing what we expect.

scara commented 7 years ago

Hi @danpoltawski, never used appveyor (at least, 'till now) but they actually have an image w/ docker: https://www.appveyor.com/docs/build-environment/#pre-installed-software => Visual Studio 2017, confirmed even in the latest update, https://www.appveyor.com/updates/2017/09/04/.

See an example in https://stefanscherer.github.io/setup-windows-docker-ci-appveyor/.

Edit: forgive my ignorance, they've docker but they're not able to run Linux images yet due to the need for nested envs => http://help.appveyor.com/discussions/questions/2652-windows-server-2016#comment_42930690. Still no ETA: http://help.appveyor.com/discussions/questions/8194-linux-docker-containers#comment_43341178, https://github.com/appveyor/ci/issues/1717.

HTH, Matteo

danpoltawski commented 7 years ago

I don’t think it can run linux containers (can’t remember the details off top of head)

danpoltawski commented 7 years ago

Ah the build is still there: https://ci.appveyor.com/project/danpoltawski/docker-moodle/build/1.0.9#L29

danpoltawski commented 7 years ago

And here is the appveyor.yml I used for reference

version: 1.0.{build}
build: off
image: Visual Studio 2017

environment:
  MOODLE_DOCKER_DB: pgsql
  MOODLE_DOCKER_WWWROOT: c:\projects\moodle

install:
  - choco install docker-compose

test_script:
  - bin\moodle-docker-compose.cmd pull
NeillM commented 7 years ago

I tried running both master and the selenium_versions branches last night on Docker for Windows (on Win 10) and neither completed.

On the selenium branch it could not find the: moodlehq/moodle-php-apache:"7.1" image.

On master it failed on the selenium image (which seemed to be earlier in the process)

On the selenium branch it works fine on Docker Toolbox on Win7 (Docker will be running inside a Linux virtual machine).

scara commented 7 years ago

Hi @NeillM, read more in https://github.com/moodlehq/moodle-docker/pull/60#issuecomment-330698220.

HTH, Matteo