Skip to content

Feature: Install argument for a leaner installation to enable static analyses #65

Closed
@Dagefoerde

Description

@Dagefoerde

Travis has a cool new feature called "stages" that facilitate splitting tasks. We want to leverage this since we have a large build matrix (for PHP version, Moodle version, database): Right now, all scripts are executed for every instance of that matrix. However, most scripts are static analyses that will have the same result in every instance, so it would be sufficient to run them once.

Example:
stages

The single run in Static now calls all static analyses, e.g. CPD and basic plugin checks. In contrast, Test contains the full build matrix, running PHPUnit and Behat on each instance.

Regarding the issue: We have to execute moodle-plugin-ci install on every single job. For the static analyses we actually only do this to have the specified Moodle, but it installs the full database regardless: https://github.com/moodlerooms/moodle-plugin-ci/blob/173764f0235cc26b955d4864d8abf418366fdeda/src/Installer/InstallerFactory.php#L82

Would it be possible to add an argument to install to suppress installing the DB? I envision something like moodle-plugin-ci install --no-install-db that just makes sure that all files are in place for the Static stage, but that does not perform a full installation.

Cheers!

(Also, as an example, here is the .travis.yml that results in the above screenshot: https://github.com/Dagefoerde/moodle-repository_owncloud/blob/c6d19cea78a138b98a35ffadc809723bcb7b4210/.travis.yml)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions