name: QA

on:
    pull_request:
        branches:
            - release/*

jobs:
    backend:
        runs-on: ubuntu-18.04
        steps:
            -   uses: actions/checkout@v2

            # https://github.com/php-actions/composer
            -   uses: actions/cache@v1
                with:
                    path: vendor
                    key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}

            # https://github.com/shivammathur/setup-php
            -   uses: shivammathur/setup-php@v1
                with:
                    php-version: '7.0'
                    coverage: none # disable xdebug, pcov

            -   run: composer validate --strict
            -   run: composer config -g github-oauth.github.com ${{ secrets.COMPOSER_ZICHTONLINE_TOKEN }}
            -   run: composer install --prefer-dist --no-progress --no-suggest --no-scripts
            -   if: always()
                run: composer run-script lint-no-warn
            -   if: always()
                run: composer run-script test

    translations:
        runs-on: ubuntu-18.04
        steps:
            -   uses: actions/checkout@v2
            -   uses: actions/setup-python@v2
                with:
                    python-version: '3.6'
            -   run: python -m pip install --upgrade pip
            -   run: pip install yaz_messaging_plugin
            -   run: yaz-messaging version
            -   run: yaz-messaging check

name: QA

on:
    pull_request:
        branches:
            - release/*

jobs:
    backend:
        runs-on: ubuntu-18.04
        steps:
            -   uses: actions/checkout@v2

            # https://github.com/php-actions/composer
            -   uses: actions/cache@v1
                with:
                    path: vendor
                    key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}

            # https://github.com/shivammathur/setup-php
            -   uses: shivammathur/setup-php@v1
                with:
                    php-version: '7.1'
                    coverage: none # disable xdebug, pcov

            -   run: composer validate --strict
            -   run: composer config -g github-oauth.github.com ${{ secrets.COMPOSER_ZICHTONLINE_TOKEN }}
            -   run: composer install --prefer-dist --no-progress --no-suggest --no-scripts
            -   if: always()
                run: composer run-script lint-no-warn
            -   if: always()
                run: composer run-script test

    translations:
        runs-on: ubuntu-18.04
        steps:
            -   uses: actions/checkout@v2
            -   uses: actions/setup-python@v2
                with:
                    python-version: '3.6'
            -   run: python -m pip install --upgrade pip
            -   run: pip install yaz_messaging_plugin
            -   run: yaz-messaging version
            -   run: yaz-messaging check

Use php 7.1 to test because "symfony/console": "^4.4" requires this
Use php 7.1 to test because "symfony/console": "^4.4" requires this
