-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (54 loc) · 1.71 KB
/
workflow.yml
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
name: timestampable-bundle-CI
on:
[push, pull_request]
jobs:
phpstan:
runs-on: ubuntu-latest
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v2
- name: composer install
run: composer install
- name: PHPStan
run: composer phpstan
env:
REQUIRE_DEV: true
cs-fixer:
runs-on: ubuntu-latest
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v2
- name: composer install
run: composer install
- name: CS Check
run: composer cs-check
tests:
name: PHP ${{ matrix.php }} / SF ^${{ matrix.symfony }}
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.2']
symfony: ['6.2.*', '6.3.*', '6.4.*', '7.0.*']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup MySQL
run: |
sudo systemctl enable mysql.service
sudo systemctl start mysql.service
mysql -uroot -proot -h localhost -e "CREATE DATABASE test CHARACTER SET utf8 COLLATE utf8_general_ci;"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- if: matrix.symfony == '5.4.*'
run: |
sed -ri 's/"symfony\/framework-bundle": "(.+)"/"symfony\/framework-bundle": "${{ matrix.symfony }}"/' composer.json;
sed -ri 's/"symfony\/yaml": "(.+)"/"symfony\/yaml": "${{ matrix.symfony }}"/' composer.json;
- if: matrix.symfony != '5.4.*'
run: |
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "${{ matrix.symfony }}"/' composer.json;
- run: composer update --no-interaction --no-progress --ansi
- run: composer phpunit