-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Moving all subpackages into monorepo, added Github Actions for …
…splitting repositories BREAKING CHANGES: All roadiz/* sub packages source code will be hold in this repository. roadiz/* sub-packages will be read-only on Github.
- Loading branch information
1 parent
cadb95b
commit 3e3f0f0
Showing
20 changed files
with
213 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Unit tests, static analysis and code style | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- 'release/**' | ||
- 'hotfix/**' | ||
tags: ['**'] | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: ['8.0', '8.1'] | ||
steps: | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
- uses: actions/checkout@v3 | ||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php-${{ matrix.php-version }}- | ||
- name: Install Dependencies | ||
run: composer install --no-scripts --no-ansi --no-interaction --no-progress | ||
- name: Validate monorepo | ||
run: > | ||
vendor/bin/monorepo-builder validate | ||
- name: Run unit tests | ||
run: > | ||
vendor/bin/atoum -d ./lib/Documents/tests | ||
vendor/bin/atoum -f ./lib/EntityGenerator/tests/units/* | ||
- name: Run PHP Code Sniffer | ||
run: > | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/DocGenerator/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Documents/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/DtsGenerator/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/EntityGenerator/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Jwt/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Markdown/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Models/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/OpenId/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Random/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizCompatBundle/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizCoreBundle/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizFontBundle/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizRozierBundle/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizUserBundle/src | ||
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Rozier/src | ||
- name: Run PHP Stan | ||
run: > | ||
php -d "memory_limit=-1" vendor/bin/phpstan analyse -c phpstan.neon | ||
- name: Run Twig lint | ||
run: > | ||
php -d "memory_limit=-1" bin/console lint:twig ./lib/Rozier/src/Resources/views | ||
php -d "memory_limit=-1" bin/console lint:twig ./lib/Documents/src/Resources/views | ||
php -d "memory_limit=-1" bin/console lint:twig ./lib/RoadizUserBundle/templates | ||
php -d "memory_limit=-1" bin/console lint:twig ./lib/RoadizRozierBundle/templates | ||
php -d "memory_limit=-1" bin/console lint:twig ./lib/RoadizFontBundle/templates | ||
php -d "memory_limit=-1" bin/console lint:twig ./lib/RoadizCoreBundle/templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: 'Packages Split' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
tags: | ||
- '*' | ||
|
||
env: | ||
# 1. for Github split -- Update secret on 2024-03-06 | ||
GITHUB_TOKEN: ${{ secrets.ROADIZ_SPLIT_ACCESS_TOKEN }} | ||
|
||
|
||
jobs: | ||
packages_split: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# define package to repository map | ||
package: | ||
- | ||
local_path: 'DocGenerator' | ||
split_repository: 'doc-generator' | ||
- | ||
local_path: 'Documents' | ||
split_repository: 'documents' | ||
- | ||
local_path: 'DtsGenerator' | ||
split_repository: 'dts-generator' | ||
- | ||
local_path: 'EntityGenerator' | ||
split_repository: 'entity-generator' | ||
- | ||
local_path: 'Jwt' | ||
split_repository: 'jwt' | ||
- | ||
local_path: 'Markdown' | ||
split_repository: 'markdown' | ||
- | ||
local_path: 'Models' | ||
split_repository: 'models' | ||
- | ||
local_path: 'OpenId' | ||
split_repository: 'openid' | ||
- | ||
local_path: 'Random' | ||
split_repository: 'random' | ||
- | ||
local_path: 'RoadizCompatBundle' | ||
split_repository: 'compat-bundle' | ||
- | ||
local_path: 'RoadizCoreBundle' | ||
split_repository: 'core-bundle' | ||
- | ||
local_path: 'RoadizFontBundle' | ||
split_repository: 'font-bundle' | ||
- | ||
local_path: 'RoadizRozierBundle' | ||
split_repository: 'rozier-bundle' | ||
- | ||
local_path: 'RoadizUserBundle' | ||
split_repository: 'user-bundle' | ||
- | ||
local_path: 'Rozier' | ||
split_repository: 'rozier' | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# no tag | ||
- if: "!startsWith(github.ref, 'refs/tags/')" | ||
uses: "symplify/[email protected]" | ||
with: | ||
# ↓ split "lib/local_path" directory | ||
package_directory: 'lib/${{ matrix.package.local_path }}' | ||
|
||
# ↓ into https://github.com/roadiz/split_repository repository | ||
repository_organization: 'roadiz' | ||
repository_name: '${{ matrix.package.split_repository }}' | ||
|
||
# ↓ the user signed under the split commit | ||
user_name: "roadiz-ci" | ||
user_email: "[email protected]" | ||
|
||
# with tag | ||
- if: "startsWith(github.ref, 'refs/tags/')" | ||
uses: "symplify/[email protected]" | ||
with: | ||
tag: ${GITHUB_REF#refs/tags/} | ||
|
||
# ↓ split "lib/local_path" directory | ||
package_directory: 'lib/${{ matrix.package.local_path }}' | ||
|
||
# ↓ into https://github.com/roadiz/split_repository repository | ||
repository_organization: 'roadiz' | ||
repository_name: '${{ matrix.package.split_repository }}' | ||
|
||
# ↓ the user signed under the split commit | ||
user_name: "roadiz-ci" | ||
user_email: "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule DocGenerator
added at
fd0390
Submodule Documents
added at
bc335d
Submodule DtsGenerator
added at
28efe3
Submodule EntityGenerator
added at
fc27fa
Submodule Jwt
added at
0b23d1
Submodule Markdown
added at
dd2d28
Submodule Models
added at
cde85e
Submodule OpenId
added at
ddb954
Submodule Random
added at
3444ef
Submodule RoadizCompatBundle
added at
e7c8b8
Submodule RoadizCoreBundle
added at
3c4971
Submodule RoadizFontBundle
added at
33ca5c
Submodule RoadizRozierBundle
added at
2f5df5
Submodule RoadizUserBundle
added at
440bed
Submodule Rozier
added at
76d192
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters