stages:
    - test

# Test coding standards.
coding standards:
    image: registry.gitlab.com/forestcitylabs/ops/phpcs:latest
    stage: test
    script:
        - phpcs .

# Run unit tests.
unit tests:
    image: registry.gitlab.com/forestcitylabs/ops/phpunit:latest
    stage: test
    script:
        - phpunit --colors=never --coverage-text
    before_script:
        - COMPOSER_MEMORY_LIMIT=-1 composer install --no-progress --no-interaction --ignore-platform-reqs
    cache:
        key: ${CI_COMMIT_REF_SLUG}
        paths:
            - vendor/

stages:
    - test

# Test coding standards.
coding standards:
    image: registry.gitlab.com/forestcitylabs/ops/phpcs:latest
    stage: test
    script:
        - phpcs .

# Run unit tests.
unit tests:
    image: registry.gitlab.com/forestcitylabs/ops/phpunit:latest
    stage: test
    variables:
        COMPOSER_MEMORY_LIMIT: -1
    script:
        - composer install --no-progress --no-interaction --ignore-platform-reqs
        - phpunit --colors=never --coverage-text
    cache:
        key: ${CI_COMMIT_REF_SLUG}
        paths:
            - vendor/

Set memory limit in environment.
Set memory limit in environment.
