name: Packages (Unstable) on: workflow_dispatch: ~ workflow_call: inputs: type: description: "Type of the build" required: true type: string ignore-failure: description: "Don't fail on error" required: false type: boolean default: false jobs: get-matrix: runs-on: ubuntu-latest name: "Get matrix" outputs: matrix: ${{ steps.matrix.outputs.prop }} steps: - uses: actions/checkout@v3 - name: "Get matrix" id: matrix uses: notiz-dev/github-action-json-property@release with: path: '.github/workflows/matrix.json' prop_path: '${{ inputs.type }}.packages' test_unstable: needs: get-matrix runs-on: ubuntu-latest name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }} (Unstable Dependencies)" timeout-minutes: 25 strategy: fail-fast: false matrix: ${{ fromJson(needs.get-matrix.outputs.matrix) }} env: COMPOSER_ROOT_VERSION: "dev-main" SYMFONY_VERSION: "${{ matrix.symfony }}" UNSTABLE: "yes" steps: - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" coverage: none - name: Restrict Symfony version run: | composer global config --no-plugins allow-plugins.symfony/flex true composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5" composer config extra.symfony.require "${{ matrix.symfony }}" - name: Get Composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-" restore-keys: | "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-" - name: Install dependencies run: composer update --no-interaction --no-scripts - name: "Run pipeline" continue-on-error: ${{ inputs.ignore-failure }} run: find src/Sylius -mindepth 3 -maxdepth 3 -type f -name composer.json -exec dirname '{}' \; | sed -e 's/src\/Sylius\///g' | sort | jq --raw-input . | jq --slurp . | jq -c . | xargs -0 vendor/bin/robo ci:packages