Merge pull request #282 from NoelDeMartin/macos #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: moodle-docker CI | |
on: [push, pull_request] | |
jobs: | |
integration: | |
name: Integration checks | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checking out moodle-docker | |
uses: actions/checkout@v4 | |
- name: Checking out moodle | |
uses: actions/checkout@v4 | |
with: | |
repository: moodle/moodle | |
path: moodle | |
ref: ${{ matrix.branch }} | |
- name: Prepare moodle-docker environment | |
run: | | |
cp config.docker-template.php moodle/config.php | |
tests/integration-setup.sh | |
- name: Run moodle-docker tests | |
run: | | |
tests/integration-test.sh | |
- name: Stop moodle-docker | |
run: | | |
tests/integration-teardown.sh | |
PHPUnit: | |
needs: integration | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# PostgreSQL (highest, lowest php supported) | |
- { branch: main, php: "8.2", database: pgsql, suite: phpunit-full } # Full run only for main. | |
- { branch: main, php: "8.1", database: pgsql, suite: phpunit-full } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: pgsql, suite: phpunit } # Other branches, quicker run. | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_402_STABLE, php: "8.0", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_400_STABLE, php: "7.3", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_311_STABLE, php: "7.3", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_310_STABLE, php: "7.2", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: pgsql, suite: phpunit } | |
- { branch: MOODLE_39_STABLE, php: "7.2", database: pgsql, suite: phpunit } | |
# MariaDB (lowest php supported) | |
- { branch: main, php: "8.1", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_402_STABLE, php: "8.0", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_401_STABLE, php: "7.4", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_400_STABLE, php: "7.3", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_311_STABLE, php: "7.3", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_310_STABLE, php: "7.2", database: mariadb, suite: phpunit } | |
- { branch: MOODLE_39_STABLE, php: "7.2", database: mariadb, suite: phpunit } | |
# Other databases (highest php supported) | |
- { branch: main, php: "8.2", database: mssql, suite: phpunit } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: mssql, suite: phpunit } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: mssql, suite: phpunit } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: mssql, suite: phpunit } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: mssql, suite: phpunit } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: mssql, suite: phpunit } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: mssql, suite: phpunit } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: mssql, suite: phpunit } | |
- { branch: main, php: "8.2", database: mysql, suite: phpunit } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: mysql, suite: phpunit } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: mysql, suite: phpunit } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: mysql, suite: phpunit } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: mysql, suite: phpunit } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: mysql, suite: phpunit } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: mysql, suite: phpunit } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: mysql, suite: phpunit } | |
- { branch: main, php: "8.2", database: oracle, suite: phpunit } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: oracle, suite: phpunit } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: oracle, suite: phpunit } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: oracle, suite: phpunit } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: oracle, suite: phpunit } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: oracle, suite: phpunit } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: oracle, suite: phpunit } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: oracle, suite: phpunit } | |
steps: | |
- name: Checking out moodle-docker | |
uses: actions/checkout@v4 | |
- name: Checking out moodle | |
uses: actions/checkout@v4 | |
with: | |
repository: moodle/moodle | |
path: moodle | |
ref: ${{ matrix.branch }} | |
- name: Prepare moodle-docker environment | |
run: | | |
cp config.docker-template.php moodle/config.php | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export MOODLE_DOCKER_PHP_VERSION="${{ matrix.php }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/phpunit-setup.sh | |
- name: Run moodle-docker tests | |
run: | | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/phpunit-test.sh | |
- name: Stop moodle-docker | |
run: | | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/phpunit-teardown.sh | |
Behat: | |
needs: integration | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# PostgreSQL (highest, lowest php supported) | |
- { branch: main, php: "8.2", database: pgsql, browser: chrome, suite: behat } | |
- { branch: main, php: "8.1", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_402_STABLE, php: "8.0", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_400_STABLE, php: "7.3", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_311_STABLE, php: "7.3", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_310_STABLE, php: "7.2", database: pgsql, browser: firefox, suite: behat } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: pgsql, browser: chrome, suite: behat } | |
- { branch: MOODLE_39_STABLE, php: "7.2", database: pgsql, browser: firefox, suite: behat } | |
# MariaDB (lowest php supported) | |
- { branch: main, php: "8.1", database: mariadb, browser: chrome, suite: behat } | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: mariadb, browser: firefox, suite: behat } | |
- { branch: MOODLE_402_STABLE, php: "8.0", database: mariadb, browser: firefox, suite: behat } | |
- { branch: MOODLE_401_STABLE, php: "7.4", database: mariadb, browser: chrome, suite: behat } | |
- { branch: MOODLE_400_STABLE, php: "7.3", database: mariadb, browser: firefox, suite: behat } | |
- { branch: MOODLE_311_STABLE, php: "7.3", database: mariadb, browser: chrome, suite: behat } | |
- { branch: MOODLE_310_STABLE, php: "7.2", database: mariadb, browser: firefox, suite: behat } | |
- { branch: MOODLE_39_STABLE, php: "7.2", database: mariadb, browser: chrome, suite: behat } | |
# Other databases (highest php supported") | |
- { branch: main, php: "8.2", database: mssql, browser: firefox, suite: behat } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: mssql, browser: chrome, suite: behat } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: mssql, browser: chrome, suite: behat } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: mssql, browser: firefox, suite: behat } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: mssql, browser: chrome, suite: behat } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: mssql, browser: firefox, suite: behat } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: mssql, browser: chrome, suite: behat } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: mssql, browser: firefox, suite: behat } | |
- { branch: main, php: "8.2", database: mysql, browser: chrome, suite: behat } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: mysql, browser: firefox, suite: behat } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: mysql, browser: firefox, suite: behat } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: mysql, browser: chrome, suite: behat } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: mysql, browser: firefox, suite: behat } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: mysql, browser: chrome, suite: behat } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: mysql, browser: firefox, suite: behat } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: mysql, browser: chrome, suite: behat } | |
- { branch: main, php: "8.2", database: oracle, browser: firefox, suite: behat } | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: oracle, browser: chrome, suite: behat } | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: oracle, browser: chrome, suite: behat } | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: oracle, browser: firefox, suite: behat } | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: oracle, browser: chrome, suite: behat } | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: oracle, browser: firefox, suite: behat } | |
- { branch: MOODLE_310_STABLE, php: "7.4", database: oracle, browser: chrome, suite: behat } | |
- { branch: MOODLE_39_STABLE, php: "7.4", database: oracle, browser: firefox, suite: behat } | |
steps: | |
- name: Checking out moodle-docker | |
uses: actions/checkout@v4 | |
- name: Checking out moodle | |
uses: actions/checkout@v4 | |
with: | |
repository: moodle/moodle | |
path: moodle | |
ref: ${{ matrix.branch }} | |
- name: Prepare moodle-docker environment | |
run: | | |
cp config.docker-template.php moodle/config.php | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export MOODLE_DOCKER_PHP_VERSION="${{ matrix.php }}" | |
export SUITE="${{ matrix.suite }}" | |
export MOODLE_DOCKER_BROWSER="${{ matrix.browser }}" | |
tests/behat-setup.sh | |
- name: Run moodle-docker tests | |
run: | | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/behat-test.sh | |
- name: Stop moodle-docker | |
run: | | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/behat-teardown.sh | |
App: | |
needs: integration | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# PostgreSQL (highest, lowest php supported) | |
# First tests are for app developers. | |
- { branch: MOODLE_403_STABLE, php: "8.2", suite: app-development, app-version: "latest" } | |
- { branch: MOODLE_403_STABLE, php: "8.0", suite: app-development, app-version: "latest" } | |
- { branch: MOODLE_403_STABLE, php: "8.2", suite: app-development, app-version: "main" } | |
- { branch: MOODLE_403_STABLE, php: "8.0", suite: app-development, app-version: "main" } | |
# Tests for Moodle plugin developers who want to test against the next version of the app. | |
- { branch: MOODLE_403_STABLE, php: "8.2", suite: app, app-version: "next-test" } | |
- { branch: MOODLE_403_STABLE, php: "8.0", suite: app, app-version: "next-test" } | |
# Tests for Moodle plugin developers testing against all supported versions of Moodle. | |
- { branch: MOODLE_403_STABLE, php: "8.2", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_403_STABLE, php: "8.0", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_402_STABLE, php: "8.2", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_402_STABLE, php: "8.0", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_401_STABLE, php: "8.1", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_401_STABLE, php: "7.4", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_400_STABLE, php: "8.0", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_400_STABLE, php: "7.3", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_311_STABLE, php: "8.0", suite: app, app-version: "latest-test" } | |
- { branch: MOODLE_311_STABLE, php: "7.3", suite: app, app-version: "latest-test" } | |
steps: | |
- name: Checking out moodle-docker | |
uses: actions/checkout@v4 | |
- name: Checking out moodle | |
uses: actions/checkout@v4 | |
with: | |
repository: moodle/moodle | |
path: moodle | |
ref: ${{ matrix.branch }} | |
- name: Prepare moodle-docker environment | |
run: | | |
cp config.docker-template.php moodle/config.php | |
export MOODLE_DOCKER_PHP_VERSION="${{ matrix.php }}" | |
export SUITE="${{ matrix.suite }}" | |
export MOODLE_DOCKER_APP_VERSION="${{ matrix.app-version }}" | |
tests/app-setup.sh | |
- name: Run moodle-docker tests | |
run: | | |
export MOODLE_DOCKER_APP_VERSION="${{ matrix.app-version }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/app-test.sh | |
- name: Stop moodle-docker | |
run: | | |
export SUITE="${{ matrix.suite }}" | |
export MOODLE_DOCKER_APP_VERSION="${{ matrix.app-version }}" | |
tests/app-teardown.sh |