image: iqrfsdk/iqrf-daemon-webapp:tests

stages:
    - test
    - coding-style

cache:
    paths:
        - vendor/

.test_template: &test_template
    stage: test
    before_script:
        - composer install
    tags:
        - linux
        - amd64

test:php7.0:
    script:
        - vendor/bin/tester -p phpdbg7.0 -C -s ./tests
    <<: *test_template

test:php7.1:
    script:
        - vendor/bin/tester -p phpdbg7.1 -C -s ./tests
    <<: *test_template

test:php7.2:
    script:
        - vendor/bin/tester -p phpdbg7.2 -C -s ./tests
    before_script:
        - composer install

coding-style:
    stage: coding-style
    script:
        - composer install-cs
        - composer check-cs
    tags:
        - linux
        - amd64

image: iqrfsdk/iqrf-daemon-webapp:tests

stages:
    - test
    - coding-style

cache:
    paths:
        - "$HOME/.composer/cache"

.test_template: &test_template
    stage: test
    before_script:
        - composer install
    tags:
        - linux
        - amd64

test:php7.0:
    script:
        - vendor/bin/tester -p phpdbg7.0 -C -s ./tests
    <<: *test_template

test:php7.1:
    script:
        - vendor/bin/tester -p phpdbg7.1 -C -s ./tests
    <<: *test_template

test:php7.2:
    script:
        - vendor/bin/tester -p phpdbg7.2 -C -s ./tests
    before_script:
        - composer install

coding-style:
    stage: coding-style
    script:
        - composer install-cs
        - composer check-cs
    tags:
        - linux
        - amd64

Add a composer's package caching for GitLab CI
Add a composer's package caching for GitLab CI

Signed-off-by: Roman Ondráček <f226ca4e9e6347db373d27b729024cc130f78ec9@iqrf.com>
