Skip to content

Commit abfe041

Browse files
committed
Switch to GitHub Actions
1 parent 298b75e commit abfe041

File tree

2 files changed

+66
-51
lines changed

2 files changed

+66
-51
lines changed

.github/workflows/ci.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
name: PHPUnit PHP ${{ matrix.php }} ${{ matrix.dependency }} (Symfony ${{ matrix.symfony }})
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php:
14+
- '7.2'
15+
- '7.3'
16+
- '7.4'
17+
- '8.0'
18+
dependency:
19+
- ''
20+
symfony:
21+
- '4.4.*'
22+
- '5.3.*'
23+
include:
24+
- php: '7.2'
25+
symfony: '4.4.*'
26+
dependency: 'lowest'
27+
fail-fast: false
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: pcov
37+
tools: flex
38+
39+
- name: Get Composer Cache Directory
40+
id: composer-cache
41+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
42+
43+
- name: Cache dependencies
44+
uses: actions/cache@v2
45+
with:
46+
path: ${{ steps.composer-cache.outputs.dir }}
47+
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
48+
restore-keys: ${{ matrix.php }}-composer-
49+
50+
- name: Update project dependencies
51+
if: matrix.dependency == ''
52+
run: composer update --no-progress --ansi --prefer-stable
53+
env:
54+
SYMFONY_REQUIRE: ${{ matrix.symfony }}
55+
56+
- name: Update project dependencies lowest
57+
if: matrix.dependency == 'lowest'
58+
run: composer update --no-progress --ansi --prefer-stable --prefer-lowest
59+
env:
60+
SYMFONY_REQUIRE: ${{ matrix.symfony }}
61+
62+
- name: Validate composer
63+
run: composer validate --strict --no-check-lock
64+
65+
- name: Run tests
66+
run: vendor/bin/phpunit

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)