-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (65 loc) · 2.33 KB
/
bundle_tests.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#.github/workflows/php.yml
name: Bundle Tests
on:
push: ~
pull_request: ~
jobs:
build:
runs-on: ${{ matrix.operating-system }}
name: PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php: [ '8.2','8.3' ]
symfony: ['~6.3.0', '~6.4.0', '~7.0.0' ]
steps:
- uses: actions/checkout@master
- name: "Cache Composer packages"
uses: "actions/cache@v3"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('composer.json') }}"
restore-keys: "php-"
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2,flex
- name: Download dependencies
run: "composer update --prefer-dist"
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: install test tools
run: composer bin all install
- name: Run test suite on PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }}
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
- name: Run Psalm
run: ./vendor/bin/psalm
style_coverage_commit:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: install deps, to execute things
run: composer install --no-scripts --no-autoloader --no-progress --ignore-platform-reqs
- name: install php cs fixer
run: composer bin csfixer install --no-progress --ignore-platform-reqs
- name: fix style
run: ./vendor/bin/php-cs-fixer fix
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Commit changes
uses: stefanzweifel/[email protected]
with:
commit_message: Auto Code Style Fix
branch: ${{ steps.extract_branch.outputs.branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}