diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index ffbd2ed1..0ea2e96b 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -1,15 +1,12 @@ on: pull_request: - paths: + paths: &paths - 'src/**' - '.github/workflows/bc.yml' - 'composer.json' push: branches: ['master'] - paths: - - 'src/**' - - '.github/workflows/bc.yml' - - 'composer.json' + paths: *paths name: backwards compatibility @@ -21,7 +18,5 @@ jobs: roave_bc_check: uses: yiisoft/actions/.github/workflows/bc.yml@master with: - os: >- - ['ubuntu-latest'] php: >- ['8.5'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4204b82f..f777ece5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ on: pull_request: - paths: + paths: &paths - 'bin/**' - 'config/**' - 'resources/**' @@ -12,15 +12,7 @@ on: push: branches: ['master'] - paths: - - 'bin/**' - - 'config/**' - - 'resources/**' - - 'src/**' - - 'tests/**' - - '.github/workflows/build.yml' - - 'composer.json' - - 'phpunit.xml.dist' + paths: *paths name: build @@ -45,7 +37,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 @@ -57,7 +49,6 @@ jobs: - name: Install Composer dependencies + required yiisoft/db and yiisoft/db-sqlite uses: yiisoft/actions/install-packages@master with: - composer-root-version: 2.0.0 packages: >- ['db', 'db-sqlite'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index a8ec862d..de438d65 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,6 +1,6 @@ on: pull_request: - paths: + paths: &paths - 'bin/**' - 'config/**' - 'resources/**' @@ -11,14 +11,7 @@ on: push: branches: ['master'] - paths: - - 'bin/**' - - 'config/**' - - 'resources/**' - - 'src/**' - - '.github/workflows/composer-require-checker.yml' - - 'composer.json' - - 'composer-require-checker.json' + paths: *paths name: Composer require checker @@ -34,4 +27,3 @@ jobs: ['8.1', '8.2', '8.3', '8.4', '8.5'] required-packages: >- ['db'] - composer-root-version: 2.0.0 diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index b2650103..9e0c247b 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,74 +1,26 @@ on: pull_request: - paths: + paths: &paths + - 'resources/**' - 'src/**' + - 'tests/**' - '.github/workflows/mutation.yml' - 'composer.json' - 'infection.json.dist' push: branches: ['master'] - paths: - - 'src/**' - - '.github/workflows/mutation.yml' - - 'composer.json' - - 'infection.json.dist' + paths: *paths -name: mutation test +name: mutation + +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - mutation: - name: PHP ${{ matrix.php }} - - env: - extensions: pdo, pdo_pgsql, pdo_sqlite - - runs-on: ubuntu-latest - - strategy: - matrix: - php: - - 8.5 - - services: - postgres: - image: postgres:18 - env: - POSTGRES_USER: root - POSTGRES_PASSWORD: root - POSTGRES_DB: yiitest - ports: - - 5432:5432 - options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 - - steps: - - name: Checkout. - uses: actions/checkout@v4 - - - name: Install PHP. - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: ${{ env.extensions }} - ini-values: date.timezone='UTC' - coverage: pcov - - - name: Install Composer dependencies - uses: ramsey/composer-install@v3 - - - name: Install required yiisoft/db and yiisoft/db-pgsql - uses: yiisoft/actions/install-packages@master - with: - composer-root-version: 2.0.1 - packages: >- - ['db', 'db-pgsql'] - - - name: Run infection. - run: | - vendor/bin/infection --threads=2 --ignore-msi-with-no-mutations --test-framework-options="--testsuite=Pgsql" - env: - STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + tests: + uses: yiisoft/actions/.github/workflows/db-mutation.yml@master diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index cbc2cbaa..cad45899 100644 --- a/.github/workflows/rector-cs.yml +++ b/.github/workflows/rector-cs.yml @@ -29,4 +29,3 @@ jobs: php: '8.1' required-packages: >- ['db'] - composer-root-version: 2.0.0 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 011d4964..a51a0e77 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,6 +1,6 @@ on: pull_request: - paths: + paths: &paths - 'bin/**' - 'src/**' - '.github/workflows/static.yml' @@ -9,12 +9,7 @@ on: push: branches: ['master'] - paths: - - 'bin/**' - - 'src/**' - - '.github/workflows/static.yml' - - 'psalm*.xml' - - 'composer.json' + paths: *paths name: Static analysis @@ -30,4 +25,3 @@ jobs: ['8.1', '8.2', '8.3', '8.4'] required-packages: >- ['db'] - composer-root-version: 2.0.0