1+ # .github/workflows/code_checks.yaml
2+ name : Code_Checks
3+
4+ on : ["push", "pull_request"]
5+
6+ jobs :
7+ js-tests :
8+ name : " JS Tests"
9+ runs-on : ubuntu-20.04
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v2
13+
14+ - name : Install JS dependencies
15+ run : |
16+ cd Resources && npm install
17+
18+ - name : Run JS tests
19+ run : |
20+ cd Resources && npm run test
21+ phpunit :
22+ name : " PHP ${{ matrix.php }} + ${{ matrix.dependencies }} dependencies + Symfony ${{ matrix.symfony }}"
23+ runs-on : ubuntu-20.04
24+ strategy :
25+ fail-fast : false
26+ matrix :
27+ php : ['7.1', '7.2', '7.3', '7.4', '8.0']
28+ dependencies : [highest]
29+ symfony : ['*']
30+ include :
31+ # Minimum supported dependencies with the oldest supported PHP version
32+ - php : ' 7.1'
33+ dependencies : lowest
34+ symfony : ' *'
35+
36+ # Minimum supported dependencies with the latest supported PHP version
37+ - php : ' 8.0'
38+ dependencies : lowest
39+ symfony : ' *'
40+
41+ - php : ' 8.0'
42+ dependencies : highest
43+ symfony : ' *'
44+
45+ # Test each supported Symfony version with lowest supported PHP version
46+ - php : ' 7.1'
47+ dependencies : highest
48+ symfony : ' 3.4.*'
49+
50+ - php : ' 7.1'
51+ dependencies : highest
52+ symfony : ' 4.4.*'
53+
54+ - php : ' 7.2'
55+ dependencies : highest
56+ symfony : ' 5.4.*'
57+
58+ - php : ' 7.3'
59+ dependencies : highest
60+ symfony : ' 5.4.*'
61+
62+ - php : ' 7.4'
63+ dependencies : highest
64+ symfony : ' 5.4.*'
65+ steps :
66+ - name : Checkout
67+ uses : actions/checkout@v2
68+
69+ - name : Setup PHP
70+ uses : shivammathur/setup-php@v2
71+ with :
72+ php-version : ${{ matrix.php }}
73+
74+ - name : Require Symfony version
75+ if : matrix.symfony != '*'
76+ run : |
77+ composer global require --no-interaction --no-progress symfony/flex:^1.11
78+ composer config extra.symfony.require ${{ matrix.symfony }}
79+
80+ - name : Update project dependencies
81+ uses : ramsey/composer-install@v1
82+ with :
83+ dependency-versions : ${{ matrix.dependencies }}
84+
85+ - name : Cache PHPUnit
86+ uses : actions/cache@v2
87+ with :
88+ path : vendor/bin/.phpunit
89+ key : ${{ runner.os }}-phpunit-${{ matrix.php }}
90+
91+ - name : Install PHPUnit
92+ run : vendor/bin/simple-phpunit install
93+
94+ - name : Run PHPUnit tests
95+ env :
96+ SYMFONY_DEPRECATIONS_HELPER : max[self]=0
97+ run : vendor/bin/simple-phpunit -v
0 commit comments