-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 2.66 KB
/
installation.yml
File metadata and controls
65 lines (57 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Bundle installation
on: push
jobs:
integration-tests:
name: Installation in Symfony ${{ matrix.symfony }} with PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.4', '8.0', '8.1']
symfony: ['4.4', '5.0', '5.1', '5.2', '5.3', '5.4', '6.0']
exclude:
- php: '8.0'
symfony: '5.0'
- php: '8.1'
symfony: '5.0'
- php: '7.4'
symfony: '6.0'
steps:
# Setup
- name: Checkout
uses: actions/checkout@v2
with:
path: 'project'
- name: PHP setup
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, xml, ctype, iconv, intl
coverage: xdebug
# Install symfony app
- name: Create Symfony app
run: |
composer create-project symfony/skeleton:"${{ matrix.symfony }}.*" app
composer require -d ./app sensio/framework-extra-bundle symfony/twig-pack
composer config -d ./app repositories.commonmark-bundle path ../project
composer config -d ./app minimum-stability dev
# Cache Composer dependencies
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config -d ./app cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
# Install the bundle
- name: Install AymdevCommonmarkBundle
run: |
cp ./project/.github/fixtures/IntegrationController.php ./app/src/Controller/IntegrationController.php
cp ./project/.github/fixtures/integration.html.twig ./app/templates/home.html.twig
cp ./project/.github/fixtures/bundle_config.yaml ./app/config/packages/aymdev_commonmark.yaml
composer require -d ./app --prefer-source aymdev/commonmark-bundle:"*"
# check homepage content
- name: Check application homepage status
run: |
[[ $(php ./app/public/index.php) == "<h1>test</h1>" ]] || exit 1