diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5549e6fb537f581dfcdc444d7ac3c893de853625..2eee79d8c48316d469cb6a4cd07e8e64519776b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,3 @@ -image: "docker:latest" - stages: - build_submodule - build_webservice @@ -7,8 +5,22 @@ stages: variables: GIT_SUBMODULE_STRATEGY: recursive REGISTRY: "172.30.190.249:5000" + DB: "pgsql" + POSTGRES_USER: "postgres" + POSTGRES_PASSWORD: "" + POSTGRES_HOST_AUTH_METHOD: "trust" + TRAVIS_BUILD_DIR: "$CI_PROJECT_DIR" + +# gitlab ci script taken from https://gist.github.com/danielneis/5c6140ec8150c6151a54bccd26950278 +services: + - postgres:latest + +cache: + paths: + - $HOME/.compose/cache build_webservice: + image: "docker:latest" stage: build_webservice needs: - project: martin.heide/goe_web @@ -19,3 +31,33 @@ build_webservice: - docker script: - ./build.sh ${REGISTRY} + +job_4_3_2: + image: moodlehq/moodle-php-apache:7.3 + variables: + MOODLE_BRANCH: "MOODLE_37_STABLE" + QSTACK_VERSION: "v4.3.2" + script: + - apt update && apt install git-core postgresql-client texinfo + - cd $CI_PROJECT_DIR/.. + - curl -sS https://getcomposer.org/installer | php + - mv composer.phar /usr/local/bin/composer + - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 + - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" + - chmod u+x ci/bin/moodle-plugin-ci + - chmod u+x ci/bin/* + - umask u+x + - git clone --branch "$QSTACK_VERSION" https://github.com/maths/moodle-qtype_stack + - moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfexplicitvaildate + - moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfcbmexplicitvaildate + - moodle-plugin-ci add-plugin maths/moodle-qbehaviour_adaptivemultipart + - moodle-plugin-ci install --plugin moodle-qtype_stack + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_PLATFORM", "server");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMAVERSION", "5.41.0");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASTIMEOUT", "10");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASRESULTSCACHE", "db");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMACOMMAND", "http://kubecluster.test/godev/");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_PLOTCOMMAND", "gnuplot");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_MAXIMALIBRARIES", "stats, distrib, descriptive, simplex");' + - moodle-plugin-ci add-config 'define("QTYPE_STACK_TEST_CONFIG_CASDEBUGGING", "0");' + - moodle-plugin-ci phpunit