From 181b7f1186c16b557391d20fbe3ea123d1996447 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 18 May 2021 11:24:28 +0200 Subject: [PATCH] Remove Travis integration from this repository GHA integration has been added recently: #159 Jobs in this repo are a lot (of combinations) and they keep our travis busy for hours, not allowing other repos to advance. Plus, solve critical (:-P) typo in comment. This closes #161 --- .github/workflows/ci.yml | 2 +- .travis.yml | 115 --------------------------------------- tests/setup.sh | 51 ----------------- tests/test.sh | 24 -------- 4 files changed, 1 insertion(+), 191 deletions(-) delete mode 100644 .travis.yml delete mode 100755 tests/setup.sh delete mode 100755 tests/test.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31a5b17845c..7261a52f6d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: matrix: include: # PostgreSQL (highest, lowest php supported) - - { branch: master, php: "8.0", database: pgsql, suite: phpunit-full } # Full run only for mater. + - { branch: master, php: "8.0", database: pgsql, suite: phpunit-full } # Full run only for master. - { branch: master, php: "7.3", database: pgsql, suite: phpunit-full } - { branch: MOODLE_311_STABLE, php: "8.0", database: pgsql, suite: phpunit } # Other branches, quicker run. - { branch: MOODLE_311_STABLE, php: "7.3", database: pgsql, suite: phpunit } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d5dc57f934c..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,115 +0,0 @@ -language: shell - -os: linux -dist: xenial - -services: docker - -env: - # phpunit - # PostgreSQL highest, lowest php supported - # We have set the "phpunit-full" to run against master - - "PHP=8.0 DB=pgsql GIT=master SUITE=phpunit-full" - - "PHP=7.3 DB=pgsql GIT=master SUITE=phpunit-full" - # Other dev branches, also "phpunit-full" (parallel dev periods) - # Simpler "phpunit" for stables - - "PHP=8.0 DB=pgsql GIT=MOODLE_311_STABLE SUITE=phpunit" - - "PHP=7.3 DB=pgsql GIT=MOODLE_311_STABLE SUITE=phpunit" - - "PHP=7.4 DB=pgsql GIT=v3.10.0 SUITE=phpunit" - - "PHP=7.2 DB=pgsql GIT=v3.10.0 SUITE=phpunit" - - "PHP=7.4 DB=pgsql GIT=v3.9.1 SUITE=phpunit" - - "PHP=7.2 DB=pgsql GIT=v3.9.1 SUITE=phpunit" - - "PHP=7.4 DB=pgsql GIT=v3.8.4 SUITE=phpunit" - - "PHP=7.1 DB=pgsql GIT=v3.8.4 SUITE=phpunit" - - "PHP=7.2 DB=pgsql GIT=v3.5.8 SUITE=phpunit" - - "PHP=7.0 DB=pgsql GIT=v3.5.8 SUITE=phpunit" - # Other databases, only highest php supported - - "PHP=8.0 DB=mssql GIT=MOODLE_311_STABLE SUITE=phpunit" - - "PHP=7.4 DB=mssql GIT=v3.10.0 SUITE=phpunit" - - "PHP=7.4 DB=mssql GIT=v3.9.1 SUITE=phpunit" - - "PHP=7.4 DB=mssql GIT=v3.8.4 SUITE=phpunit" - - "PHP=7.2 DB=mssql GIT=v3.5.8 SUITE=phpunit" - - "PHP=8.0 DB=mysql GIT=MOODLE_311_STABLE SUITE=phpunit" - - "PHP=7.4 DB=mysql GIT=v3.10.0 SUITE=phpunit" - - "PHP=7.4 DB=mysql GIT=v3.9.1 SUITE=phpunit" - - "PHP=7.4 DB=mysql GIT=v3.8.4 SUITE=phpunit" - - "PHP=7.2 DB=mysql GIT=v3.5.8 SUITE=phpunit" - - "PHP=8.0 DB=oracle GIT=MOODLE_311_STABLE SUITE=phpunit" - - "PHP=7.4 DB=oracle GIT=v3.10.0 SUITE=phpunit" - - "PHP=7.4 DB=oracle GIT=v3.9.1 SUITE=phpunit" - - "PHP=7.4 DB=oracle GIT=v3.8.4 SUITE=phpunit" - - "PHP=7.2 DB=oracle GIT=v3.5.8 SUITE=phpunit" - # MariaDB, only lowest php supported - - "PHP=7.3 DB=mariadb GIT=MOODLE_311_STABLE SUITE=phpunit" - - "PHP=7.2 DB=mariadb GIT=v3.10.0 SUITE=phpunit" - - "PHP=7.2 DB=mariadb GIT=v3.9.1 SUITE=phpunit" - - "PHP=7.1 DB=mariadb GIT=v3.8.4 SUITE=phpunit" - - "PHP=7.0 DB=mariadb GIT=v3.5.8 SUITE=phpunit" - # behat - # PostgreSQL highest, lowest (2 browsers) - - "PHP=8.0 DB=pgsql GIT=master SUITE=behat BROWSER=chrome" - - "PHP=8.0 DB=pgsql GIT=master SUITE=behat BROWSER=firefox" - - "PHP=7.3 DB=pgsql GIT=master SUITE=behat BROWSER=chrome" - - "PHP=7.3 DB=pgsql GIT=master SUITE=behat BROWSER=firefox" - - "PHP=8.0 DB=pgsql GIT=MOODLE_311_STABLE SUITE=behat BROWSER=chrome" - - "PHP=8.0 DB=pgsql GIT=MOODLE_311_STABLE SUITE=behat BROWSER=firefox" - - "PHP=7.3 DB=pgsql GIT=MOODLE_311_STABLE SUITE=behat BROWSER=chrome" - - "PHP=7.3 DB=pgsql GIT=MOODLE_311_STABLE SUITE=behat BROWSER=firefox" - - "PHP=7.4 DB=pgsql GIT=v3.10.0 SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=pgsql GIT=v3.10.0 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=pgsql GIT=v3.10.0 SUITE=behat BROWSER=chrome" - - "PHP=7.2 DB=pgsql GIT=v3.10.0 SUITE=behat BROWSER=firefox" - - "PHP=7.4 DB=pgsql GIT=v3.9.1 SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=pgsql GIT=v3.9.1 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=pgsql GIT=v3.9.1 SUITE=behat BROWSER=chrome" - - "PHP=7.2 DB=pgsql GIT=v3.9.1 SUITE=behat BROWSER=firefox" - - "PHP=7.4 DB=pgsql GIT=v3.8.4 SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=pgsql GIT=v3.8.4 SUITE=behat BROWSER=firefox" - - "PHP=7.1 DB=pgsql GIT=v3.8.4 SUITE=behat BROWSER=chrome" - - "PHP=7.1 DB=pgsql GIT=v3.8.4 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=pgsql GIT=v3.5.8 SUITE=behat BROWSER=chrome" - - "PHP=7.2 DB=pgsql GIT=v3.5.8 SUITE=behat BROWSER=firefox" - - "PHP=7.0 DB=pgsql GIT=v3.5.8 SUITE=behat BROWSER=chrome" - - "PHP=7.0 DB=pgsql GIT=v3.5.8 SUITE=behat BROWSER=firefox" - # Other databases, only highest php supported (1 browsers) - - "PHP=8.0 DB=mssql GIT=MOODLE_311_STABLE SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=mssql GIT=v3.10.0 SUITE=behat BROWSER=firefox" - - "PHP=7.4 DB=mssql GIT=v3.9.1 SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=mssql GIT=v3.8.4 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=mssql GIT=v3.5.8 SUITE=behat BROWSER=chrome" - - "PHP=8.0 DB=mysql GIT=MOODLE_311_STABLE SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=mysql GIT=v3.10.0 SUITE=behat BROWSER=firefox" - - "PHP=7.4 DB=mysql GIT=v3.9.1 SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=mysql GIT=v3.8.4 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=mysql GIT=v3.5.8 SUITE=behat BROWSER=chrome" - - "PHP=8.0 DB=oracle GIT=MOODLE_311_STABLE SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=oracle GIT=v3.10.0 SUITE=behat BROWSER=firefox" - - "PHP=7.4 DB=oracle GIT=v3.9.1 SUITE=behat BROWSER=chrome" - - "PHP=7.4 DB=oracle GIT=v3.8.4 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=oracle GIT=v3.5.8 SUITE=behat BROWSER=chrome" - # MariaDB, only lowest php supported (1 browsers) - - "PHP=7.3 DB=mariadb GIT=MOODLE_311_STABLE SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=mariadb GIT=v3.10.0 SUITE=behat BROWSER=chrome" - - "PHP=7.2 DB=mariadb GIT=v3.9.1 SUITE=behat BROWSER=firefox" - - "PHP=7.2 DB=mariadb GIT=v3.8.4 SUITE=behat BROWSER=chrome" - - "PHP=7.0 DB=mariadb GIT=v3.5.8 SUITE=behat BROWSER=firefox" - # Mobile app, highest, lowest - - "PHP=8.0 DB=pgsql GIT=master SUITE=behat-app-development BROWSER=chrome APP_VERSION=3.9.0 APP_PATH=$HOME/app" - - "PHP=8.0 DB=pgsql GIT=master SUITE=behat-app BROWSER=chrome APP_VERSION=3.9.0" - - "PHP=7.3 DB=pgsql GIT=master SUITE=behat-app-development BROWSER=chrome APP_VERSION=3.9.0 APP_PATH=$HOME/app" - - "PHP=7.3 DB=pgsql GIT=master SUITE=behat-app BROWSER=chrome APP_VERSION=3.9.0" -install: - - git clone --branch $GIT --depth 1 git://github.com/moodle/moodle $HOME/moodle - - cp config.docker-template.php $HOME/moodle/config.php - - export MOODLE_DOCKER_DB=$DB - - export MOODLE_DOCKER_BROWSER=$BROWSER - - export MOODLE_DOCKER_WWWROOT="$HOME/moodle" - - export MOODLE_DOCKER_PHP_VERSION=$PHP - - export MOODLE_DOCKER_APP_PATH=$APP_PATH - - export MOODLE_DOCKER_APP_VERSION=$APP_VERSION -before_script: - - tests/setup.sh -script: - - tests/test.sh -after_script: - - bin/moodle-docker-compose down diff --git a/tests/setup.sh b/tests/setup.sh deleted file mode 100755 index f6711428214..00000000000 --- a/tests/setup.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -set -e -basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )" - -# Log in dockerhub if possible (to avoid pull limits for unauthenticated uses). -if [ -n "$DOCKER_USER" ] && [ -n "$DOCKER_TOKEN" ]; then - echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USER" --password-stdin - echo "Using authenticated connection (no pull limits)" -else - echo "Using unauthenticated docker (pull limits may apply). Setup DOCKER_USER and DOCKER_TOKEN if needed." -fi - -if [ "$SUITE" = "phpunit" ]; -then - initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/phpunit/cli/init.php" -elif [ "$SUITE" = "behat" ]; -then - initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/init.php" -elif [ "$SUITE" = "phpunit-full" ]; -then - export MOODLE_DOCKER_PHPUNIT_EXTERNAL_SERVICES=true - initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/phpunit/cli/init.php" -elif [ "$SUITE" = "behat-app-development" ]; -then - git clone --branch "v$APP_VERSION" --depth 1 git://github.com/moodlehq/moodleapp $HOME/app - git clone --branch "v$APP_VERSION" --depth 1 git://github.com/moodlehq/moodle-local_moodlemobileapp $HOME/moodle/local/moodlemobileapp - - docker run --volume $HOME/app:/app --workdir /app node:11 npm run setup - docker run --volume $HOME/app:/app --workdir /app node:11 npm ci - - initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/init.php" -elif [ "$SUITE" = "behat-app" ]; -then - git clone --branch "v$APP_VERSION" --depth 1 git://github.com/moodlehq/moodle-local_moodlemobileapp $HOME/moodle/local/moodlemobileapp - - initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/init.php" -else - echo "Error, unknown suite '$SUITE'" - exit 1 -fi - -echo "Pulling docker images" -$basedir/bin/moodle-docker-compose pull -echo "Starting up container" -$basedir/bin/moodle-docker-compose up -d -echo "Waiting for DB to come up" -$basedir/bin/moodle-docker-wait-for-db -echo "Waiting for Moodle app to come up" -$basedir/bin/moodle-docker-wait-for-app -echo "Running: $initcmd" -$basedir/$initcmd diff --git a/tests/test.sh b/tests/test.sh deleted file mode 100755 index 8fb29c8bf60..00000000000 --- a/tests/test.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -set -e - -basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )" - -if [ "$SUITE" = "phpunit" ]; -then - testcmd="bin/moodle-docker-compose exec -T webserver vendor/bin/phpunit --filter core_dml_testcase" -elif [ "$SUITE" = "behat" ]; -then - testcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/run.php --tags=@auth_manual" -elif [ "$SUITE" = "phpunit-full" ]; -then - testcmd="bin/moodle-docker-compose exec -T webserver vendor/bin/phpunit --verbose" -elif [ "$SUITE" = "behat-app" ] || [ "$SUITE" = "behat-app-development" ]; -then - testcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/run.php --tags=@app&&@mod_login" -else - echo "Error, unknown suite '$SUITE'" - exit 1 -fi - -echo "Running: $testcmd" -$basedir/$testcmd