Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Yii DI and Yii Factory tests in CI #102

Merged
merged 15 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/yiisoft-di.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

name: yiisoft-di

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

runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest
php:
- "8.1"
- "8.2"
- "8.3"

steps:
- name: Checkout Yii Definitions
uses: actions/checkout@v4
with:
path: definitions-repo

- name: Checkout Yii DI
uses: actions/checkout@v4
with:
path: di-repo
repository: 'yiisoft/di'

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"
with:
working-directory: di-repo

- name: Configure Yii Definitions usage
working-directory: ${{ github.workspace }}/di-repo
run: |
composer config repositories.local path ../definitions-repo
composer require yiisoft/definitions:@dev

- name: Run tests with PhpUnit
working-directory: ${{ github.workspace }}/di-repo
run: vendor/bin/phpunit --colors=always
73 changes: 73 additions & 0 deletions .github/workflows/yiisoft-factory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

name: yiisoft-factory

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

runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest
php:
- "8.1"
- "8.2"
- "8.3"

steps:
- name: Checkout Yii Definitions
uses: actions/checkout@v4
with:
path: definitions-repo

- name: Checkout Yii Factory
uses: actions/checkout@v4
with:
path: factory-repo
repository: 'yiisoft/factory'

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"
with:
working-directory: factory-repo

- name: Configure Yii Definitions usage
working-directory: ${{ github.workspace }}/factory-repo
run: |
composer config repositories.local path ../definitions-repo
composer require yiisoft/definitions:@dev

- name: Run tests with PhpUnit
working-directory: ${{ github.workspace }}/factory-repo
run: vendor/bin/phpunit --colors=always
Loading