forked from Codeception/module-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 2.21 KB
/
main.yml
File metadata and controls
62 lines (52 loc) · 2.21 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
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ["8.2", "8.5"]
symfony: ["5.4", "6.4", "7.4", "8.0"]
exclude:
- php: "8.2"
symfony: "8.0"
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- uses: actions/cache@v5
with:
path: ~/.cache/composer
key: php-${{ matrix.php }}-sf-${{ matrix.symfony }}-${{ hashFiles('**/composer.json') }}
restore-keys: php-${{ matrix.php }}-sf-${{ matrix.symfony }}-
- uses: actions/checkout@v6
name: Checkout Symfony ${{ matrix.symfony }} app
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: ${{ matrix.symfony }}
- name: Install dependencies
run: |
sed -i "s/\^5.4 | \^6.4 | \^7.4 | \^8.0/${{ matrix.symfony }}.*/g" composer.json
composer install --prefer-dist --no-progress
- name: Quality checks
if: matrix.symfony == '8.0'
run: composer validate --strict && composer audit && composer cs-check && composer phpstan
- name: Run module tests
run: vendor/bin/phpunit tests ${{ matrix.symfony == '8.0' && '--coverage-text --coverage-filter src' || '' }}
- name: Prepare Symfony app & run tests
run: |
composer -d framework-tests remove codeception/module-symfony --dev --no-update
composer -d framework-tests install --no-progress
php framework-tests/bin/console doctrine:schema:update --force
php framework-tests/bin/console doctrine:fixtures:load --quiet
php vendor/bin/codecept run Functional -c framework-tests
if [ "${{ matrix.symfony }}" = "7.4" ]; then
composer require codeception/module-rest --dev
git -C framework-tests apply resetFormatsAfterRequest_issue_test.patch
composer -d framework-tests install --no-progress
php framework-tests/bin/console lexik:jwt:generate-keypair --skip-if-exists
php vendor/bin/codecept run Functional -c framework-tests
fi