diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 279dad77..91632389 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,75 +1,69 @@ on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + paths: + - 'src/**' + - 'tests/**' + - '.github/workflows/build.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + branches: ['master'] + paths: + - 'src/**' + - 'tests/**' + - '.github/workflows/build.yml' + - 'composer.json' + - 'phpunit.xml.dist' name: build jobs: tests: - name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }} + name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql.server }} env: COMPOSER_ROOT_VERSION: 1.0.0 EXTENSIONS: pdo, pdo_sqlsrv-5.10.1 - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: - os: - - ubuntu-latest - php: - 8.0 - 8.1 - 8.2 + - 8.3 mssql: - - server:2017-latest - - server:2019-latest - - server:2022-latest - - exclude: - - php: 8.0 - mssql: server:2017-latest - - php: 8.1 - mssql: server:2017-latest + - server: 2022-latest + odbc-version: 18 + flag: "-C" + include: + - php: 8.3 + mssql: {server: 2017-latest} + - php: 8.3 + mssql: {server: 2019-latest} services: mssql: - image: mcr.microsoft.com/mssql/${{ matrix.mssql }} - env: - SA_PASSWORD: YourStrong!Passw0rd - ACCEPT_EULA: Y - MSSQL_PID: Developer - ports: - - 1433:1433 - options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 + image: mcr.microsoft.com/mssql/server:${{ matrix.mssql.server }} + env: + SA_PASSWORD: YourStrong!Passw0rd + ACCEPT_EULA: Y + MSSQL_PID: Developer + ports: + - 1433:1433 + options: --name=mssql --health-cmd="/opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - name: Checkout. uses: actions/checkout@v3 - name: Create MS SQL Database. - run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' + run: docker exec -i mssql /opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index fb9dfd55..58107cb7 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,25 +1,16 @@ on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' + paths: + - 'src/**' + - '.github/workflows/composer-require-checker.yml' + - 'composer.json' push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' + branches: ['master'] + paths: + - 'src/**' + - '.github/workflows/composer-require-checker.yml' + - 'composer.json' name: Composer require checker @@ -41,6 +32,7 @@ jobs: - 8.0 - 8.1 - 8.2 + - 8.3 steps: - name: Checkout. diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index bb184b91..81bbe8ec 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,21 +1,16 @@ on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' + paths: + - 'src/**' + - '.github/workflows/mutation.yml' + - 'composer.json' push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' + branches: ['master'] + paths: + - 'src/**' + - '.github/workflows/mutation.yml' + - 'composer.json' name: mutation test @@ -35,25 +30,25 @@ jobs: - ubuntu-latest php: - - 8.1 + - 8.3 services: mssql: - image: mcr.microsoft.com/mssql/server:2019-latest + image: mcr.microsoft.com/mssql/server:2022-latest env: SA_PASSWORD: YourStrong!Passw0rd ACCEPT_EULA: Y MSSQL_PID: Developer ports: - 1433:1433 - options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 + options: --name=mssql --health-cmd="/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -C -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - name: Checkout. uses: actions/checkout@v3 - name: Create MS SQL Database. - run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' + run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -C -Q 'CREATE DATABASE yiitest' - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/rector.yml_ b/.github/workflows/rector.yml_ index e21dd376..edce19b2 100644 --- a/.github/workflows/rector.yml_ +++ b/.github/workflows/rector.yml_ @@ -1,23 +1,10 @@ on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - - push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + paths: + - 'src/**' + - '.github/workflows/rector.yml' + - 'composer.json' + - 'rector.php' name: rector @@ -28,4 +15,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.0'] + ['8.3'] diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index bba89642..9ba84818 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,23 +1,18 @@ on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' + paths: + - 'src/**' + - '.github/workflows/static.yml' + - 'psalm*.xml' + - 'composer.json' push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' + branches: ['master'] + paths: + - 'src/**' + - '.github/workflows/static.yml' + - 'psalm*.xml' + - 'composer.json' name: static analysis