diff --git a/.github/workflows/create-project.yml b/.github/workflows/create-project.yml new file mode 100644 index 00000000..c8f8c3bf --- /dev/null +++ b/.github/workflows/create-project.yml @@ -0,0 +1,51 @@ +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: "7.4" + + - + name: Export configuration + continue-on-error: true + id: config + run: | + SYMFONY_ENDPOINT=https://symfony.sh/r/github.com/symfony/recipes/${{ 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 "symfony/skeleton:^4" v4 + cd v4 + composer require $PACKAGES + + - + name: Create-project with skeleton ^5 + if: "always() && steps.config.outcome == 'success'" + run: | + composer create-project "symfony/skeleton:^5" v5 + cd v5 + composer require $PACKAGES diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 96ad47f7..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: php -sudo: false - -cache: - directories: - - $HOME/.composer/cache/files - -matrix: - fast_finish: true - include: - - php: 7.4 - env: SKELETON_VERSION="^3.4" - - php: 7.4 - env: SKELETON_VERSION="^4.4" - - php: 7.4 - env: SKELETON_VERSION="^5.0" - -before_install: - - phpenv config-rm xdebug.ini || true - - export SYMFONY_ENDPOINT=https://symfony.sh/r/github.com/symfony/recipes/${TRAVIS_PULL_REQUEST} - - export PACKAGES=$(curl -s $SYMFONY_ENDPOINT | sed -En 's/.*composer req "([^"]+)".*/\1/p') - -install: - - composer create-project "symfony/skeleton:${SKELETON_VERSION}" flex - - cd flex - -script: - - composer req $(echo $PACKAGES)