From 66a35e0348944f00b9aa62ff23fbfc2f0132e568 Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Mon, 4 Nov 2024 11:57:56 +0000 Subject: [PATCH] add gitlab-ci support to individual plugin folder --- auth/oidc/.gitlab-ci.yml | 85 ++++++++++++++++++ auth/oidc/.travis.yml | 41 --------- blocks/microsoft/.gitlab-ci.yml | 87 +++++++++++++++++++ blocks/microsoft/.travis.yml | 41 --------- local/o365/.gitlab-ci.yml | 86 +++++++++++++++++++ local/o365/.travis.yml | 41 --------- local/office365/.gitlab-ci.yml | 90 ++++++++++++++++++++ local/onenote/.gitlab-ci.yml | 87 +++++++++++++++++++ local/onenote/.travis.yml | 43 ---------- mod/assign/feedback/onenote/.gitlab-ci.yml | 88 +++++++++++++++++++ mod/assign/feedback/onenote/.travis.yml | 41 --------- mod/assign/submission/onenote/.gitlab-ci.yml | 88 +++++++++++++++++++ mod/assign/submission/onenote/.travis.yml | 41 --------- repository/office365/.gitlab-ci.yml | 87 +++++++++++++++++++ repository/office365/.travis.yml | 41 --------- theme/boost_o365teams/.gitlab-ci.yml | 75 ++++++++++++++++ 16 files changed, 773 insertions(+), 289 deletions(-) create mode 100644 auth/oidc/.gitlab-ci.yml delete mode 100644 auth/oidc/.travis.yml create mode 100644 blocks/microsoft/.gitlab-ci.yml delete mode 100644 blocks/microsoft/.travis.yml create mode 100644 local/o365/.gitlab-ci.yml delete mode 100644 local/o365/.travis.yml create mode 100644 local/office365/.gitlab-ci.yml create mode 100644 local/onenote/.gitlab-ci.yml delete mode 100644 local/onenote/.travis.yml create mode 100644 mod/assign/feedback/onenote/.gitlab-ci.yml delete mode 100644 mod/assign/feedback/onenote/.travis.yml create mode 100644 mod/assign/submission/onenote/.gitlab-ci.yml delete mode 100644 mod/assign/submission/onenote/.travis.yml create mode 100644 repository/office365/.gitlab-ci.yml delete mode 100644 repository/office365/.travis.yml create mode 100644 theme/boost_o365teams/.gitlab-ci.yml diff --git a/auth/oidc/.gitlab-ci.yml b/auth/oidc/.gitlab-ci.yml new file mode 100644 index 000000000..6e3ebc20f --- /dev/null +++ b/auth/oidc/.gitlab-ci.yml @@ -0,0 +1,85 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/auth/oidc/.travis.yml b/auth/oidc/.travis.yml deleted file mode 100644 index 03a0366fc..000000000 --- a/auth/oidc/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_30_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat diff --git a/blocks/microsoft/.gitlab-ci.yml b/blocks/microsoft/.gitlab-ci.yml new file mode 100644 index 000000000..ac13122f1 --- /dev/null +++ b/blocks/microsoft/.gitlab-ci.yml @@ -0,0 +1,87 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/blocks/microsoft/.travis.yml b/blocks/microsoft/.travis.yml deleted file mode 100644 index f7b979416..000000000 --- a/blocks/microsoft/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_30_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat \ No newline at end of file diff --git a/local/o365/.gitlab-ci.yml b/local/o365/.gitlab-ci.yml new file mode 100644 index 000000000..eb5e672ce --- /dev/null +++ b/local/o365/.gitlab-ci.yml @@ -0,0 +1,86 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/local/o365/.travis.yml b/local/o365/.travis.yml deleted file mode 100644 index f7b979416..000000000 --- a/local/o365/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_30_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat \ No newline at end of file diff --git a/local/office365/.gitlab-ci.yml b/local/office365/.gitlab-ci.yml new file mode 100644 index 000000000..7f9c45539 --- /dev/null +++ b/local/office365/.gitlab-ci.yml @@ -0,0 +1,90 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_onenote.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-block_microsoft.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-theme_boost_o365teams.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/local/onenote/.gitlab-ci.yml b/local/onenote/.gitlab-ci.yml new file mode 100644 index 000000000..ac13122f1 --- /dev/null +++ b/local/onenote/.gitlab-ci.yml @@ -0,0 +1,87 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/local/onenote/.travis.yml b/local/onenote/.travis.yml deleted file mode 100644 index 1b4b74f79..000000000 --- a/local/onenote/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_31_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci dev-poet - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci codechecker --standard poet - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat - - moodle-plugin-ci phpunit --coverage-text \ No newline at end of file diff --git a/mod/assign/feedback/onenote/.gitlab-ci.yml b/mod/assign/feedback/onenote/.gitlab-ci.yml new file mode 100644 index 000000000..b0886d380 --- /dev/null +++ b/mod/assign/feedback/onenote/.gitlab-ci.yml @@ -0,0 +1,88 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_onenote.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/mod/assign/feedback/onenote/.travis.yml b/mod/assign/feedback/onenote/.travis.yml deleted file mode 100644 index 03a0366fc..000000000 --- a/mod/assign/feedback/onenote/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_30_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat diff --git a/mod/assign/submission/onenote/.gitlab-ci.yml b/mod/assign/submission/onenote/.gitlab-ci.yml new file mode 100644 index 000000000..b0886d380 --- /dev/null +++ b/mod/assign/submission/onenote/.gitlab-ci.yml @@ -0,0 +1,88 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_onenote.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/mod/assign/submission/onenote/.travis.yml b/mod/assign/submission/onenote/.travis.yml deleted file mode 100644 index 03a0366fc..000000000 --- a/mod/assign/submission/onenote/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_30_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat diff --git a/repository/office365/.gitlab-ci.yml b/repository/office365/.gitlab-ci.yml new file mode 100644 index 000000000..ac13122f1 --- /dev/null +++ b/repository/office365/.gitlab-ci.yml @@ -0,0 +1,87 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck + +php82: + tags: + - docker + image: moodlehq/moodle-php-apache:8.2 + <<: *setupandruncheck + +php83: + tags: + - docker + image: moodlehq/moodle-php-apache:8.3 + <<: *setupandruncheck diff --git a/repository/office365/.travis.yml b/repository/office365/.travis.yml deleted file mode 100644 index f7b979416..000000000 --- a/repository/office365/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -php: - - 5.6 - - 7.0 - -env: - global: - - MOODLE_BRANCH=MOODLE_30_STABLE - - matrix: - - DB=pgsql - - DB=mysqli - -before_install: - - phpenv config-rm xdebug.ini - - cd ../.. - - composer selfupdate - - composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - -install: - - moodle-plugin-ci install - -script: - - moodle-plugin-ci phplint - - moodle-plugin-ci phpcpd - - moodle-plugin-ci phpmd - - moodle-plugin-ci codechecker - - moodle-plugin-ci csslint - - moodle-plugin-ci shifter - - moodle-plugin-ci jshint - - moodle-plugin-ci validate - - moodle-plugin-ci phpunit - - moodle-plugin-ci behat \ No newline at end of file diff --git a/theme/boost_o365teams/.gitlab-ci.yml b/theme/boost_o365teams/.gitlab-ci.yml new file mode 100644 index 000000000..1305bd34b --- /dev/null +++ b/theme/boost_o365teams/.gitlab-ci.yml @@ -0,0 +1,75 @@ +services: + - name: selenium/standalone-chrome:3 + alias: behat + - name: mysql:8.0 + alias: db + command: + - '--character-set-server=utf8mb4' + - '--collation-server=utf8mb4_unicode_ci' + - '--innodb_file_per_table=On' + - '--wait-timeout=28800' + - '--skip-log-bin' + +cache: + paths: + - .cache + +variables: + DEBIAN_FRONTEND: 'noninteractive' + COMPOSER_ALLOW_SUPERUSER: 1 + COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer" + NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm" + CI_BUILD_DIR: '/tmp/plugin' + MOODLE_BRANCH: 'MOODLE_404_STABLE' + MOODLE_BEHAT_WWWROOT: 'http://localhost:8000' + MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub' + MOODLE_START_BEHAT_SERVERS: 'no' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + DB: 'mysqli' + +stages: + - moodle-plugin-ci + +.setupandruncheck: &setupandruncheck + stage: moodle-plugin-ci + before_script: + - mkdir -pv "$CI_BUILD_DIR" + - cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR" + - mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + - apt-get -qq update + - apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client + - 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash' + - . ~/.bashrc + - nvm install --default --latest-npm lts/gallium + - 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer' + - composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4 + - export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH" + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH + - moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH + - moodle-plugin-ci install --db-host db --db-name moodle + - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }' + - TXT_RED="\e[31m" + + script: + - errors=() + - moodle-plugin-ci phplint || errors+=("phplint") + - moodle-plugin-ci phpmd || errors+=("phpmd") + - moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker") + - moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc") + - moodle-plugin-ci validate || errors+=("validate") + - moodle-plugin-ci savepoints || errors+=("savepoints") + - moodle-plugin-ci mustache || errors+=("mustache") + - moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt") + - moodle-plugin-ci phpunit || errors+=("phpunit") + - moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat") + - |- + if [ ${#errors[@]} -ne 0 ]; then + echo -e "${TXT_RED}Check errors: ${errors[@]}"; + exit 1; + fi + +php81: + tags: + - docker + image: moodlehq/moodle-php-apache:8.1 + <<: *setupandruncheck