Switch from Travis to GitHub Actions
This commit is contained in:
56
.github/workflows/build.yml
vendored
Normal file
56
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push: ~
|
||||||
|
pull_request: ~
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
schedule:
|
||||||
|
-
|
||||||
|
cron: "0 1 * * 6" # Run at 1am every Saturday
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php: ["7.3", "7.4", "8.0"]
|
||||||
|
symfony: ["4.4.*", "5.1.*"]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: "${{ matrix.php }}"
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Update Symfony version
|
||||||
|
if: matrix.symfony != ''
|
||||||
|
run: |
|
||||||
|
composer require symfony/dependency-injection:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
composer require symfony/http-kernel:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
composer require symfony/proxy-manager-bridge:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
|
||||||
|
composer require --dev symfony/browser-kit:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
composer require --dev symfony/framework-bundle:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
composer require --dev symfony/process:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
composer require --dev symfony/yaml:${{ matrix.symfony }} --no-update --no-scripts
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Install dependencies
|
||||||
|
run: composer update
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Run analysis
|
||||||
|
run: composer analyse
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Run tests
|
||||||
|
run: composer test
|
||||||
37
.travis.yml
37
.travis.yml
@@ -1,37 +0,0 @@
|
|||||||
language: php
|
|
||||||
|
|
||||||
php:
|
|
||||||
- '7.2'
|
|
||||||
- '7.3'
|
|
||||||
- '7.4'
|
|
||||||
- '8.0snapshot'
|
|
||||||
|
|
||||||
env:
|
|
||||||
- SYMFONY_VERSION=4.4.*
|
|
||||||
- SYMFONY_VERSION=5.1.*
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- ~/.composer/cache/files
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- phpenv config-rm xdebug.ini || true
|
|
||||||
- composer self-update --2 # Upgrade to Compose 2 (needed for PHP 8 support), only needed while it's not installed by default
|
|
||||||
|
|
||||||
install:
|
|
||||||
- composer require symfony/dependency-injection:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
- composer require symfony/http-kernel:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
- composer require symfony/proxy-manager-bridge:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
|
|
||||||
- composer require --dev symfony/browser-kit:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
- composer require --dev symfony/framework-bundle:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
- composer require --dev symfony/process:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
- composer require --dev symfony/yaml:${SYMFONY_VERSION} --no-update --no-scripts --prefer-dist
|
|
||||||
|
|
||||||
# ignore-platform-req=php is necessary temporarily because PageObjectExtension isn't compatible with PHP8 yet: https://github.com/FriendsOfBehat/PageObjectExtension/pull/16
|
|
||||||
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "8.0" ]]; then composer update --prefer-dist --ignore-platform-req=php; else composer update --prefer-dist; fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- composer check
|
|
||||||
|
|
||||||
- vendor/bin/behat -f progress --strict -vvv --no-interaction
|
|
||||||
@@ -46,16 +46,16 @@
|
|||||||
"sort-packages": true
|
"sort-packages": true
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"check": [
|
"analyse": [
|
||||||
"composer validate --ansi --strict",
|
"@composer validate --ansi --strict",
|
||||||
"@analyse"
|
"vendor/bin/ecs check --ansi --no-progress-bar src tests",
|
||||||
|
"vendor/bin/psalm src --no-progress"
|
||||||
],
|
],
|
||||||
"fix": [
|
"fix": [
|
||||||
"vendor/bin/ecs check --ansi --no-progress-bar src tests --fix"
|
"vendor/bin/ecs check --ansi --no-progress-bar src tests --fix"
|
||||||
],
|
],
|
||||||
"analyse": [
|
"test": [
|
||||||
"vendor/bin/ecs check --ansi --no-progress-bar src tests",
|
"vendor/bin/behat -f progress --strict -vvv --no-interaction --colors"
|
||||||
"vendor/bin/psalm src --no-progress"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|||||||
Reference in New Issue
Block a user