|
1 | 1 | name: Flex Recipe |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: [ master ] |
6 | | - pull_request: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 |
|
10 | | - recipe: |
11 | | - |
12 | | - runs-on: ubuntu-latest |
13 | | - |
14 | | - strategy: |
15 | | - fail-fast: false |
16 | | - matrix: |
17 | | - php: ['8.1', '8.2'] |
18 | | - sylius: ["~1.12.0", "~1.13.0"] |
19 | | - |
20 | | - steps: |
21 | | - - name: Setup PHP |
22 | | - uses: shivammathur/setup-php@v2 |
23 | | - with: |
24 | | - php-version: ${{ matrix.php }} |
25 | | - extensions: gd, intl, json |
26 | | - ini-values: date.timezone=UTC |
27 | | - tools: symfony-cli |
28 | | - |
29 | | - - name: Set project php-version |
30 | | - run: | |
31 | | - echo ${{ matrix.php }} > .php-version |
32 | | -
|
33 | | - - uses: actions/checkout@v3 |
34 | | - with: |
35 | | - path: plugin |
36 | | - |
37 | | - - name: Determine composer cache directory |
38 | | - id: composer-cache-directory |
39 | | - working-directory: plugin |
40 | | - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT |
41 | | - |
42 | | - - name: Cache dependencies installed with composer |
43 | | - uses: actions/cache@v3 |
44 | | - id: cache-composer |
45 | | - with: |
46 | | - path: ${{ steps.composer-cache-directory.outputs.directory }} |
47 | | - key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }} |
48 | | - restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}- |
49 | | - |
50 | | - - name: Ensure that composer cache directory exists |
51 | | - run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} |
52 | | - |
53 | | - - name: Composer Github Auth |
54 | | - run: composer config -g github-oauth.github.com ${{ github.token }} |
55 | | - |
56 | | - - name: Create Sylius-Standard project without install |
57 | | - run: | |
58 | | - composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}" |
59 | | -
|
60 | | - # Because the sylius-standard has a soft constraint |
61 | | - - name: Make sure to install the required version of Sylius |
62 | | - working-directory: ./sylius |
63 | | - run: | |
64 | | - composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}" |
65 | | -
|
66 | | - - name: Setup some requirements |
67 | | - working-directory: ./sylius |
68 | | - run: | |
69 | | - composer config --no-plugins allow-plugins true |
70 | | - composer config --no-plugins extra.symfony.allow-contrib true |
71 | | - composer config --no-plugins secure-http false |
72 | | - composer config --no-plugins --unset platform.php |
73 | | - composer config --no-plugins extra.symfony.docker false |
74 | | - composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]' |
75 | | - composer config repositories.plugin '{"type": "path", "url": "../plugin/"}' |
76 | | -
|
77 | | - - name: Require plugin & install all dependencies |
78 | | - working-directory: ./sylius |
79 | | - run: | |
80 | | - composer require monsieurbiz/sylius-blog-plugin="*@dev" |
| 10 | + recipe: |
| 11 | + |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + php: ['8.1', '8.2', '8.3'] |
| 18 | + sylius: ["~1.12.0", "~1.13.0", "1.14.0"] |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Setup PHP |
| 22 | + uses: shivammathur/setup-php@v2 |
| 23 | + with: |
| 24 | + php-version: ${{ matrix.php }} |
| 25 | + extensions: gd, intl, json |
| 26 | + ini-values: date.timezone=UTC |
| 27 | + tools: symfony-cli |
| 28 | + |
| 29 | + - name: Set project php-version |
| 30 | + run: | |
| 31 | + echo ${{ matrix.php }} > .php-version |
| 32 | +
|
| 33 | + - uses: actions/checkout@v3 |
| 34 | + with: |
| 35 | + path: plugin |
| 36 | + |
| 37 | + - name: Determine composer cache directory |
| 38 | + id: composer-cache-directory |
| 39 | + working-directory: plugin |
| 40 | + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT |
| 41 | + |
| 42 | + - name: Cache dependencies installed with composer |
| 43 | + uses: actions/cache@v3 |
| 44 | + id: cache-composer |
| 45 | + with: |
| 46 | + path: ${{ steps.composer-cache-directory.outputs.directory }} |
| 47 | + key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }} |
| 48 | + restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}- |
| 49 | + |
| 50 | + - name: Ensure that composer cache directory exists |
| 51 | + run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} |
| 52 | + |
| 53 | + - name: Composer Github Auth |
| 54 | + run: composer config -g github-oauth.github.com ${{ github.token }} |
| 55 | + |
| 56 | + - name: Create Sylius-Standard project without install |
| 57 | + run: | |
| 58 | + composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}" |
| 59 | +
|
| 60 | + # Because the sylius-standard has a soft constraint |
| 61 | + - name: Make sure to install the required version of Sylius |
| 62 | + working-directory: ./sylius |
| 63 | + run: | |
| 64 | + composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}" |
| 65 | +
|
| 66 | + - name: Setup some requirements |
| 67 | + working-directory: ./sylius |
| 68 | + run: | |
| 69 | + composer config --no-plugins allow-plugins true |
| 70 | + composer config --no-plugins extra.symfony.allow-contrib true |
| 71 | + composer config --no-plugins secure-http false |
| 72 | + composer config --no-plugins --unset platform.php |
| 73 | + composer config --no-plugins extra.symfony.docker false |
| 74 | + composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]' |
| 75 | + composer config repositories.plugin '{"type": "path", "url": "../plugin/"}' |
| 76 | +
|
| 77 | + - name: Require plugin & install all dependencies |
| 78 | + working-directory: ./sylius |
| 79 | + run: | |
| 80 | + composer require monsieurbiz/sylius-blog-plugin="*@dev" |
0 commit comments