Add 403 GHA support #202
Workflow file for this run
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: | |
PHPUnit: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# PostgreSQL (highest, lowest php supported) | |
- { branch: master, php: "8.2", database: pgsql, suite: phpunit-full } # Full run only for master. | |
- { branch: master, php: "8.0", 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: master, php: "8.0", 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: master, 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: master, 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: master, 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@v3 | |
- name: Checking out moodle | |
uses: actions/checkout@v3 | |
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: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# PostgreSQL (highest, lowest php supported) | |
- { branch: master, php: "8.2", database: pgsql, browser: chrome, suite: behat } | |
- { branch: master, php: "8.0", 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: master, php: "8.0", 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: master, 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: master, 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: master, 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@v3 | |
- name: Checking out moodle | |
uses: actions/checkout@v3 | |
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: | |
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", database: pgsql, runtime: ionic5, suite: app-development, app-version: "latest"} | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app-development, app-version: "latest"} | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: pgsql, runtime: ionic5, suite: app-development, app-version: "main" } | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: pgsql, runtime: ionic5, 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", database: pgsql, runtime: ionic5, suite: app, app-version: "next-dev"} | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "next-dev"} | |
# Tests for Moodle plugin developers testing against all supported versions of Moodle. | |
- { branch: MOODLE_403_STABLE, php: "8.2", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_403_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_402_STABLE, php: "8.2", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_402_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_401_STABLE, php: "8.1", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_400_STABLE, php: "7.3", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_311_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
- { branch: MOODLE_311_STABLE, php: "7.3", database: pgsql, runtime: ionic5, suite: app, app-version: "latest-dev"} | |
steps: | |
- name: Checking out moodle-docker | |
uses: actions/checkout@v3 | |
- name: Checking out moodle | |
uses: actions/checkout@v3 | |
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 RUNTIME="${{ matrix.runtime }}" | |
export MOODLE_DOCKER_APP_VERSION="${{ matrix.app-version }}" | |
tests/app-setup.sh | |
- name: Run moodle-docker tests | |
run: | | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export SUITE="${{ matrix.suite }}" | |
tests/app-test.sh | |
- name: Stop moodle-docker | |
run: | | |
export MOODLE_DOCKER_DB="${{ matrix.database }}" | |
export SUITE="${{ matrix.suite }}" | |
export MOODLE_DOCKER_APP_VERSION="${{ matrix.app-version }}" | |
tests/app-teardown.sh |