Skip to content

Commit e986aa9

Browse files
authored
Merge pull request #164 from bocharsky-bw/ci
Add GitHub Actions CI config
2 parents ebe542b + 67054fa commit e986aa9

File tree

4 files changed

+56
-6
lines changed

4 files changed

+56
-6
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
14+
strategy: [ 'highest' ]
15+
sf_version: ['']
16+
include:
17+
- php: 7.4
18+
strategy: 'lowest'
19+
- php: 7.3
20+
sf_version: '4.*'
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Set up PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
coverage: none
31+
tools: flex
32+
33+
- name: Download dependencies
34+
uses: ramsey/composer-install@v1
35+
env:
36+
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
37+
with:
38+
dependency-versions: ${{ matrix.strategy }}
39+
composer-options: --no-interaction --prefer-dist --optimize-autoloader
40+
41+
- name: Install PHPUnit
42+
run: ./vendor/bin/simple-phpunit install
43+
44+
- name: Run tests
45+
run: ./vendor/bin/simple-phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.phpunit.result.cache
12
/behat.yml
23
/build/
34
/composer.lock

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111
"require": {
1212
"php": "^7.2 || ^8.0",
1313
"nikic/php-parser": "^3.0 || ^4.0",
14-
"symfony/finder": "^3.4 || ^4.3 || ^5.0",
14+
"symfony/finder": "^3.4 || ^4.4 || ^5.0",
1515
"twig/twig": "^2.0 || ^3.0",
16-
"doctrine/annotations": "^1.2"
16+
"doctrine/annotations": "^1.7"
1717
},
1818
"require-dev": {
1919
"symfony/phpunit-bridge": "^5.0",
20-
"symfony/translation": "^3.4 || ^4.3 || ^5.0",
21-
"symfony/validator": "^3.4 || ^4.3 || ^5.0",
22-
"symfony/twig-bridge": "^3.4 || ^4.3 || ^5.0",
23-
"phpunit/phpunit": "^8.4",
20+
"symfony/translation": "^3.4 || ^4.4 || ^5.0",
21+
"symfony/validator": "^3.4 || ^4.4 || ^5.0",
22+
"symfony/twig-bridge": "^3.4 || ^4.4 || ^5.0",
2423
"knplabs/knp-menu": "^3.1"
2524
},
2625
"autoload": {

phpunit.xml.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
bootstrap="./tests/bootstrap.php"
1212
>
1313

14+
<php>
15+
<env name="SYMFONY_PHPUNIT_VERSION" value="8.5" />
16+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="verbose=1" />
17+
</php>
18+
1419
<listeners>
1520
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
1621
</listeners>

0 commit comments

Comments
 (0)