Skip to content

Commit

Permalink
Init github actions with support of PHP 8.1 and symfony6
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfausk committed Feb 16, 2022
1 parent 2446e2b commit 8f920ad
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 31 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
pull_request:

defaults:
run:
shell: bash

jobs:

tests:
name: Tests
runs-on: ubuntu-20.04
strategy:
matrix:
php: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
symfony: ['symfony3', 'symfony4', 'symfony5']
include:
- php: '8.0'
symfony: 'symfony6'
- php: '8.1'
symfony: 'symfony6'
fail-fast: false
env:
MATRIX_PHP: ${{ matrix.php }}
MATRIX_SYMFONY: ${{ matrix.symfony }}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php }}"
tools: composer
# PHP 7.1 development web server segfaults if timezone not set.
ini-values: date.timezone=Europe/Berlin, error_reporting=-1, display_errors=On
- name: Install scenario
run: |
.scenarios.lock/install "${{ matrix.symfony }}" "${DEPENDENCIES}"
- name: Configure for PHP >= 7.2
if: "${{ matrix.php >= '7.2' }}"
run: |
composer require --no-update --dev dbrekelmans/bdi
- name: Add browser drivers for PHP >= 7.2
if: "${{ matrix.php >= '7.2' }}"
run: |
vendor/bin/bdi detect drivers
- name: Add browser drivers for PHP == 7.1
if: "${{ matrix.php == '7.1' }}"
# additionally, place 'chromedriver' file also in folder 'driver' for symfony/panther >=0.9 and PHP 7.1
run: |
bin/updatePantherChromeDriver.sh
mkdir drivers
mv vendor/symfony/panther/chromedriver-bin/chromedriver_linux64 drivers/chromedriver
- name: Run unit tests
run: |
vendor/bin/phpunit -v
- name: Run behat tests
run: |
vendor/bin/behat --config=tests/Behat/behat.yml
- name: Archive logs artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: logs_php-${{ matrix.php }}
path: |
logs
1 change: 1 addition & 0 deletions .scenarios.lock/symfony6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
53 changes: 53 additions & 0 deletions .scenarios.lock/symfony6/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "robertfausk/behat-panther-extension",
"type": "behat-extension",
"description": "Symfony Panther extension for Behat",
"keywords": [
"behat",
"symfony",
"panther",
"web",
"test",
"browser",
"gui"
],
"license": "MIT",
"authors": [
{
"name": "Robert Freigang",
"email": "[email protected]"
}
],
"require": {
"symfony/config": "^6.0",
"php": ">=7.1",
"behat/behat": "^3.0.5",
"robertfausk/mink-panther-driver": "^1.0",
"friends-of-behat/mink-extension": "^2.3.0"
},
"require-dev": {
"roave/security-advisories": "dev-master",
"phpunit/phpunit": "~7.5|~9.3",
"matthiasnoback/symfony-config-test": "^4.1",
"g1a/composer-test-scenarios": "^3.0"
},
"autoload": {
"psr-4": {
"Robertfausk\\Behat\\PantherExtension\\": "../../src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "../../tests/"
}
},
"config": {
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}
56 changes: 28 additions & 28 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2021 Robert Freigang
Copyright (c) 2019-2022 Robert Freigang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,34 +24,34 @@ DEPENDENCY LICENSES:

Name Version License
behat/behat v3.7.0 MIT
behat/gherkin v4.8.0 MIT
behat/mink v1.8.1 MIT
behat/gherkin v4.9.0 MIT
behat/mink v1.9.0 MIT
behat/transliterator v1.3.0 Artistic-1.0
friends-of-behat/mink-extension v2.5.0 MIT
php-webdriver/webdriver 1.9.0 MIT
psr/container 1.0.0 MIT
psr/log 1.1.3 MIT
robertfausk/mink-panther-driver v1.0.7 MIT
symfony/browser-kit v5.2.3 MIT
php-webdriver/webdriver 1.12.0 MIT
psr/container 1.1.2 MIT
psr/log 2.0.0 MIT
robertfausk/mink-panther-driver v1.0.8 MIT
symfony/browser-kit v5.4.3 MIT
symfony/config v3.4.47 MIT
symfony/console v4.4.19 MIT
symfony/css-selector v5.2.3 MIT
symfony/console v4.4.37 MIT
symfony/css-selector v5.4.3 MIT
symfony/dependency-injection v3.4.47 MIT
symfony/deprecation-contracts v2.2.0 MIT
symfony/dom-crawler v5.2.3 MIT
symfony/event-dispatcher v4.4.19 MIT
symfony/event-dispatcher-contracts v1.1.9 MIT
symfony/filesystem v4.4.19 MIT
symfony/http-client v5.2.3 MIT
symfony/http-client-contracts v2.3.1 MIT
symfony/panther v1.0.1 MIT
symfony/polyfill-ctype v1.22.1 MIT
symfony/polyfill-mbstring v1.22.1 MIT
symfony/polyfill-php72 v1.22.1 MIT
symfony/polyfill-php73 v1.22.1 MIT
symfony/polyfill-php80 v1.22.1 MIT
symfony/process v5.2.3 MIT
symfony/service-contracts v2.2.0 MIT
symfony/translation v4.4.19 MIT
symfony/translation-contracts v2.3.0 MIT
symfony/yaml v5.2.3 MIT
symfony/deprecation-contracts v2.5.0 MIT
symfony/dom-crawler v5.4.3 MIT
symfony/event-dispatcher v4.4.37 MIT
symfony/event-dispatcher-contracts v1.1.11 MIT
symfony/filesystem v4.4.37 MIT
symfony/http-client v5.4.3 MIT
symfony/http-client-contracts v2.5.0 MIT
symfony/panther v1.1.1 MIT
symfony/polyfill-ctype v1.24.0 MIT
symfony/polyfill-mbstring v1.24.0 MIT
symfony/polyfill-php72 v1.24.0 MIT
symfony/polyfill-php73 v1.24.0 MIT
symfony/polyfill-php80 v1.24.0 MIT
symfony/process v5.4.3 MIT
symfony/service-contracts v2.5.0 MIT
symfony/translation v4.4.37 MIT
symfony/translation-contracts v2.5.0 MIT
symfony/yaml v5.3.14 MIT
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ private function spin(\Closure $closure, ?int $tries = 25): ?NodeElement

Start docker-compose with php version of your choice. At the moment the following php versions can be used with docker-compose: php7.1, php7.2, php7.3, php7.4 and php8.0.

docker-compose up php7.2
docker-compose up php8.1

Run phpunit tests

docker-compose run php7.2 vendor/bin/phpunit
docker-compose run php8.1 vendor/bin/phpunit

## Credits

Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"php": ">=7.1",
"behat/behat": "^3.0.5",
"robertfausk/mink-panther-driver": "^1.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/config": "^3.4|^4.0|^5.0|^6.0",
"friends-of-behat/mink-extension": "^2.3.0"
},
"require-dev": {
Expand All @@ -49,6 +49,11 @@
"dev-master": "1.0.x-dev"
},
"scenarios": {
"symfony6": {
"require": {
"symfony/config": "^6.0"
}
},
"symfony5": {
"require": {
"symfony/config": "^5.0"
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@ services:
- PHP_VERSION=8.0
volumes:
- .:/var/www/html

php8.1:
tty: true
build:
context: .
args:
- PHP_VERSION=8.1
volumes:
- .:/var/www/html

0 comments on commit 8f920ad

Please sign in to comment.