Skip to content

Commit

Permalink
Merge pull request #729 from XWB/github-actions
Browse files Browse the repository at this point in the history
Migrate to GitHub Actions
  • Loading branch information
XWB authored Jan 18, 2022
2 parents 7068ff8 + 4ebcea7 commit c3cfef2
Show file tree
Hide file tree
Showing 8 changed files with 351 additions and 119 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on: ['push', 'pull_request']

jobs:
cs:
runs-on: ubuntu-latest
name: Coding style
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: json, mbstring
tools: composer, php-cs-fixer:2.19

- name: Display tools versions
run: |
composer --version
php-cs-fixer --version
- name: Check PHP code
run: php-cs-fixer fix --dry-run --diff --ansi

phpunit:
name: PHPUnit (PHP ${{ matrix.php }} + ${{ matrix.symfony-version}})
runs-on: ubuntu-latest
timeout-minutes: 15
env:
SYMFONY_REQUIRE: "${{ matrix.symfony_require }}"
strategy:
matrix:
include:
- php: '7.2'
dependencies: 'lowest'
symfony_require: '3.4.*'
- php: '7.4'
dependencies: 'highest'
symfony_require: '4.4.*'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: pecl, composer
extensions: curl, json, mbstring, openssl

- name: Globally install symfony/flex
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex

- name: Install Composer dependencies (${{ matrix.dependencies }})
uses: ramsey/composer-install@v1
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --prefer-stable"

- name: Run unit tests
run: |
vendor/bin/phpunit
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit c3cfef2

Please sign in to comment.