mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-11 15:16:55 +03:00
Move create-project from travis to gha
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
name: Q&A
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
|
||||
create-project:
|
||||
name: Create-project
|
||||
runs-on: Ubuntu-20.04
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
coverage: "none"
|
||||
php-version: "8.0"
|
||||
|
||||
-
|
||||
name: Export configuration
|
||||
continue-on-error: true
|
||||
id: config
|
||||
run: |
|
||||
SYMFONY_ENDPOINT=https://flex.symfony.com/r/github.com/symfony/recipes-contrib/${{ github.event.number }}
|
||||
echo SYMFONY_ENDPOINT=$SYMFONY_ENDPOINT >> $GITHUB_ENV
|
||||
|
||||
PACKAGES=$(curl -s $SYMFONY_ENDPOINT | sed -En 's/.*composer req "([^"]+)".*/\1/p')
|
||||
echo PACKAGES=$PACKAGES >> $GITHUB_ENV
|
||||
|
||||
[[ "" != "$PACKAGES" ]]
|
||||
|
||||
-
|
||||
name: Create-project with skeleton ^4
|
||||
if: "always() && steps.config.outcome == 'success'"
|
||||
run: |
|
||||
composer create-project --ansi "symfony/skeleton:^4" v4
|
||||
cd v4
|
||||
composer config extra.symfony.allow-contrib true
|
||||
composer require --ansi --ignore-platform-reqs $PACKAGES
|
||||
EXIT_CODE=$?
|
||||
|
||||
if [[ EXIT_CODE -eq 2 ]]; then
|
||||
echo -e "\n#\n#\n# You can ignore this error if your package does not support Symfony 4\n#\n#\n#\n"
|
||||
fi
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
||||
-
|
||||
name: Create-project with skeleton ^5
|
||||
if: "always() && steps.config.outcome == 'success'"
|
||||
run: |
|
||||
composer create-project --ansi "symfony/skeleton:^5" v5
|
||||
cd v5
|
||||
composer config extra.symfony.allow-contrib true
|
||||
composer require --ansi --ignore-platform-reqs $PACKAGES
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main
|
||||
unzip recipes-checker.zip
|
||||
cd recipes-checker-main
|
||||
composer install --no-dev
|
||||
composer install --ansi --no-dev
|
||||
|
||||
-
|
||||
name: Check manifest.json files
|
||||
|
||||
Reference in New Issue
Block a user