Skip to content

Commit

Permalink
Update workflow (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov authored Nov 28, 2024
1 parent d23be31 commit 56d4069
Show file tree
Hide file tree
Showing 19 changed files with 344 additions and 451 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/bc.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
paths:
- 'src/**'
- '.github/workflows/bc.yml'
- 'composer.json'
push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
paths:
- 'src/**'
- '.github/workflows/bc.yml'
- 'composer.json'

name: backwards compatibility

Expand Down
66 changes: 38 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
paths:
- 'bin/**'
- 'config/**'
- 'resources/**'
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
paths:
- 'bin/**'
- 'config/**'
- 'resources/**'
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'

name: build

Expand All @@ -28,44 +30,52 @@ concurrency:

jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
name: PHP ${{ matrix.php }}

runs-on: ${{ matrix.os }}
env:
COMPOSER_ROOT_VERSION: dev-master

runs-on: ubuntu-latest

strategy:
matrix:
os:
- ubuntu-latest

php:
- '8.1'
- '8.2'
- '8.3'
- 8.1
- 8.2
- 8.3

steps:
- name: Checkout.
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: date.timezone='UTC', pcov.directory=$GITHUB_WORKSPACE, pcov.exclude=#^(?!($GITHUB_WORKSPACE/config/|$GITHUB_WORKSPACE/src/)).*#
coverage: pcov
tools: composer:v2

- name: Update composer.
run: composer self-update

- name: Set environment variables pull request linux.
uses: yiisoft/actions/db/environment-linux@master

- name: Install db-sqlite.
run: composer require yiisoft/db-sqlite:^1.0 --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
uses: yiisoft/actions/db/subpackage-install@master
with:
BRANCH_NAME: ${{ env.BRANCH_NAME }}
COMPOSER_ROOT_VERSION: ${{ env.COMPOSER_ROOT_VERSION }}
CURRENT_PACKAGE: db-sqlite
FULL_BRANCH_NAME: ${{ env.FULL_BRANCH_NAME }}
WORK_PACKAGE_URL: ${{ env.WORK_PACKAGE_URL }}

- name: Run tests with phpunit.
run: vendor/bin/phpunit --testsuite=Migration --coverage-clover=coverage.xml --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '8.3'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
34 changes: 16 additions & 18 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
paths:
- 'bin/**'
- 'config/**'
- 'resources/**'
- 'src/**'
- '.github/workflows/composer-require-checker.yml'
- 'composer.json'
- 'composer-require-checker.json'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
paths:
- 'bin/**'
- 'config/**'
- 'resources/**'
- 'src/**'
- '.github/workflows/composer-require-checker.yml'
- 'composer.json'
- 'composer-require-checker.json'

name: Composer require checker

Expand Down
94 changes: 0 additions & 94 deletions .github/workflows/mariadb.yml

This file was deleted.

Loading

0 comments on commit 56d4069

Please sign in to comment.