name: QA

on:
    pull_request:
        branches:
            - release/*

jobs:
    backend:
        runs-on: ubuntu-18.04
        strategy:
            matrix:
                php: [ '7.2', '7.4', '8.0', '8.1' ]
        name: PHP ${{ matrix.php }}
        steps:
            -   uses: actions/checkout@v2

            # https://github.com/shivammathur/setup-php
            -   uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php }}
                    coverage: none # disable xdebug, pcov
                    tools: composer:v2

            -   run: composer validate --strict
            -   run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
            -   run: composer install --prefer-dist --no-progress --no-scripts
            -   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-22.04
        strategy:
            matrix:
                php: [ '7.2', '7.4', '8.0', '8.1' ]
        name: PHP ${{ matrix.php }}
        steps:
            -   uses: actions/checkout@v2

            # https://github.com/shivammathur/setup-php
            -   uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php }}
                    coverage: none # disable xdebug, pcov
                    tools: composer:v2

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

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

Update GH actions for deprecated Ubuntu
Update GH actions for deprecated Ubuntu