Skip to content

Update rector/rector requirement from ^1.0 to ^2.0 #556

Update rector/rector requirement from ^1.0 to ^2.0

Update rector/rector requirement from ^1.0 to ^2.0 #556

Workflow file for this run

on:
pull_request:
paths:
- 'resources/**'
- 'src/**'
- 'tests/**'
- '.github/workflows/mssql.yml'
- 'composer.json'
- 'phpunit.xml.dist'
push:
branches: ['master']
paths:
- 'resources/**'
- 'src/**'
- 'tests/**'
- '.github/workflows/mssql.yml'
- 'composer.json'
- 'phpunit.xml.dist'
name: mssql
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: PHP ${{ matrix.php }}-mssql
env:
COMPOSER_ROOT_VERSION: dev-master
extensions: pdo, pdo_sqlsrv
runs-on: ubuntu-latest
strategy:
matrix:
php:
- 8.1
- 8.2
- 8.3
services:
mssql:
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-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Install ODBC driver.
run: |
sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
- name: Checkout.
uses: actions/checkout@v4
- name: Create MS SQL Database.
run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
coverage: pcov
- name: Update composer.
run: composer self-update
- name: Set environment variables pull request linux.
uses: yiisoft/actions/db/environment-linux@master
- name: Install db-mssql.
uses: yiisoft/actions/db/subpackage-install@master
with:
BRANCH_NAME: ${{ env.BRANCH_NAME }}
COMPOSER_ROOT_VERSION: ${{ env.COMPOSER_ROOT_VERSION }}
CURRENT_PACKAGE: db-mssql
FULL_BRANCH_NAME: ${{ env.FULL_BRANCH_NAME }}
WORK_PACKAGE_URL: ${{ env.WORK_PACKAGE_URL }}
- name: Run tests with phpunit.
run: vendor/bin/phpunit --testsuite=Mssql --coverage-clover=coverage.xml --colors=always
- name: Upload coverage to Codecov.
if: matrix.php == '8.3'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml