Skip to content

Commit

Permalink
minor #64 Switch from Travis to GitHub Actions (pamil)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.0-dev branch.

Discussion
----------



Commits
-------

17d4fda Switch from Travis to GitHub Actions
  • Loading branch information
pamil committed Nov 5, 2020
2 parents 563187f + 17d4fda commit d707137
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 51 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
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: Build and test
strategy:
fail-fast: false
matrix:
include:
-
php: 7.3
symfony-version: 4.4.*
twig-version: 2.*
-
php: 7.3
symfony-version: 5.1.*
twig-version: 2.*
-
php: 7.3
symfony-version: 4.4.*
twig-version: 3.*
-
php: 7.3
symfony-version: 5.1.*
twig-version: 3.*
-
php: 7.4
symfony-version: 4.4.*
twig-version: 2.*
-
php: 7.4
symfony-version: 5.1.*
twig-version: 2.*
-
php: 7.4
symfony-version: 4.4.*
twig-version: 3.*
-
php: 7.4
symfony-version: 5.1.*
twig-version: 3.*
-
php: 8.0
symfony-version: 4.4.*
twig-version: 2.*
composer-flags: "--ignore-platform-req=php"
-
php: 8.0
symfony-version: 5.1.*
twig-version: 2.*
composer-flags: "--ignore-platform-req=php"
-
php: 8.0
symfony-version: 4.4.*
twig-version: 3.*
composer-flags: "--ignore-platform-req=php"
-
php: 8.0
symfony-version: 5.1.*
twig-version: 3.*
composer-flags: "--ignore-platform-req=php"

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-version != ''
run: |
composer require "symfony/asset:${{ matrix.symfony-version }}" "symfony/config:${{ matrix.symfony-version }}" "symfony/console:${{ matrix.symfony-version }}" "symfony/dom-crawler:${{ matrix.symfony-version }}" "symfony/dependency-injection:${{ matrix.symfony-version }}" "symfony/filesystem:${{ matrix.symfony-version }}" "symfony/finder:${{ matrix.symfony-version }}" "symfony/form:${{ matrix.symfony-version }}" "symfony/framework-bundle:${{ matrix.symfony-version }}" "symfony/http-foundation:${{ matrix.symfony-version }}" "symfony/http-kernel:${{ matrix.symfony-version }}" "symfony/options-resolver:${{ matrix.symfony-version }}" "symfony/translation:${{ matrix.symfony-version }}" --no-update --no-scripts
composer require --dev "symfony/browser-kit:${{ matrix.symfony-version }}" "symfony/security-csrf:${{ matrix.symfony-version }}" "symfony/twig-bundle:${{ matrix.symfony-version }}" --no-update --no-scripts
-
name: Update Twig version
if: matrix.twig-version != ''
run: composer require --dev "twig/twig:${{ matrix.twig-version }}" --no-update --no-scripts

-
name: Install dependencies
run: composer update ${{ matrix.composer-flags }}

-
name: Run analysis
run: composer analyse

-
name: Run tests
run: composer test
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
},
"scripts": {
"analyse": [
"@composer validate --strict",
"vendor/bin/ecs check spec src tests",
"vendor/bin/phpstan analyse --ansi -c phpstan.neon -l max spec src tests",
"vendor/bin/psalm"
Expand Down

0 comments on commit d707137

Please sign in to comment.