include:
    remote: https://gitlab.com/eappointment/php-base/-/raw/main/template-php-ci.yml

test-php-73:
    extends: .test-php
    allow_failure: false
    variables:
      PHP_VERSION: "7.3"
    only:
        changes:
            - .gitlab-ci.yml
            - composer.lock
            - composer.json
            - templates/**/*
            - src/**/*
            - tests/**/*.{json,php}

#test-php-81:
#    extends: .test-php
#    allow_failure: true
#    variables:
#      PHP_VERSION: "8.1"
#    only:
#        changes:
#            - .gitlab-ci.yml
#            - composer.lock
#            - composer.json
#            - schema/**/*
#            - templates/**/*
#            - src/**/*
#            - tests/**/*.{json,php}

outdated:
    extends: .test-phpoutdated

pages:
    stage: deploy
    script:
        - echo "/zmsmessaging/ /zmsmessaging/_tests/coverage/index.html 302" >> public/_redirects
        - find public/
    artifacts:
        paths:
            - public
    only:
        refs:
            - main
        changes:
            - src/**/*
            - tests/**/*.{json,php}
    environment:
        name: analytics
        url: https://eappointment.gitlab.io/zmsmessaging

build-docker:
    extends: .build-docker