Skip to content

Instantly share code, notes, and snippets.

@andriyun
Last active February 6, 2020 15:34
Show Gist options
  • Select an option

  • Save andriyun/01588166431c1d87dc7689e167822ff5 to your computer and use it in GitHub Desktop.

Select an option

Save andriyun/01588166431c1d87dc7689e167822ff5 to your computer and use it in GitHub Desktop.

Revisions

  1. andriyun revised this gist Feb 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion OS2Web_development_guide.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ should contain necessary:
    * upgrade path for existing installation

    ## Testing
    Every change should be tested by "code driver" approach.
    Every change should be tested by "code driven" approach.
    Testing should happen before update module code on customer project.

    Test case:
  2. andriyun revised this gist Feb 6, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions OS2Web_development_guide.md
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,7 @@ All changes should be applied without manual action thouhg user interface
    Example of commands:
    ```
    1. composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-interaction
    cd some-dir
    drush si
    2. cd web/modules
    git clone [git-repo-url]
  3. andriyun revised this gist Feb 6, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions OS2Web_development_guide.md
    Original file line number Diff line number Diff line change
    @@ -27,6 +27,7 @@ Test case:
    4. Apply changes for module, with proper dependencies update if required
    5. Reset cache, run updb
    6. Check test nodes(entities) from step 3

    All changes should be applied without manual action thouhg user interface

    Example of commands:
  4. andriyun revised this gist Feb 6, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions OS2Web_development_guide.md
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,7 @@ Test case:
    All changes should be applied without manual action thouhg user interface

    Example of commands:
    ```
    1. composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-interaction
    drush si
    2. cd web/modules
    @@ -41,3 +42,4 @@ Example of commands:
    drush updb
    drush cr
    6. #Check test content from step 3
    ```
  5. andriyun revised this gist Feb 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion OS2Web_development_guide.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ Example of commands:
    2. cd web/modules
    git clone [git-repo-url]
    git checkout master (previous commit hash)
    3. # Prepare test case content
    3. #Prepare test case content
    4. git checkout develop (your changes branch)
    5. composer install
    drush updb
  6. andriyun created this gist Feb 6, 2020.
    43 changes: 43 additions & 0 deletions OS2Web_development_guide.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # General rules

    ## Composer based code delivery

    All features and functionality should implemented as composer package and should
    be available to download via composer. By default it's recommended to use
    [packagist.org](https://packagist.org/) as package registry.

    ## Configuration
    Features functionality should be installed and configured from code during
    installation or updating process. It means that all default values for setting
    forms should be provided from configuration files where it possible.

    In case of changes/additions/deletions in existing functionality your code diff
    should contain necessary:
    * changes to initial configuration
    * upgrade path for existing installation

    ## Testing
    Every change should be tested by "code driver" approach.
    Testing should happen before update module code on customer project.

    Test case:
    1. Install fresh Drupal core
    2. Add and activate module before changes
    3. Create test nodes(entities) that represent state of functionality before changes.
    4. Apply changes for module, with proper dependencies update if required
    5. Reset cache, run updb
    6. Check test nodes(entities) from step 3
    All changes should be applied without manual action thouhg user interface

    Example of commands:
    1. composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-interaction
    drush si
    2. cd web/modules
    git clone [git-repo-url]
    git checkout master (previous commit hash)
    3. # Prepare test case content
    4. git checkout develop (your changes branch)
    5. composer install
    drush updb
    drush cr
    6. #Check test content from step 3