Skip to content

Commit 8b4184f

Browse files
authored
Move from Travis CI to Github Actions (#45)
1 parent 33e7e47 commit 8b4184f

File tree

2 files changed

+102
-45
lines changed

2 files changed

+102
-45
lines changed

.github/workflows/test.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}
8+
9+
runs-on: ubuntu-18.04
10+
11+
continue-on-error: ${{ matrix.experimental }}
12+
13+
strategy:
14+
matrix:
15+
include:
16+
- php-version: '7.1'
17+
symfony-version: '^4.3'
18+
composer-version: v1
19+
stability: stable
20+
coverage: none
21+
experimental: false
22+
- php-version: '7.2'
23+
symfony-version: '^4.3'
24+
composer-version: v1
25+
stability: stable
26+
coverage: none
27+
experimental: false
28+
- php-version: '7.2'
29+
symfony-version: '^5.0'
30+
composer-version: v1
31+
stability: stable
32+
coverage: none
33+
experimental: false
34+
- php-version: '7.3'
35+
symfony-version: '^5.0'
36+
composer-version: v1
37+
stability: stable
38+
coverage: none
39+
experimental: false
40+
- php-version: '7.4'
41+
symfony-version: '^5.0'
42+
composer-version: v2
43+
stability: stable
44+
coverage: xdebug
45+
experimental: false
46+
- php-version: '8.0'
47+
symfony-version: '^5.0'
48+
composer-version: v2
49+
stability: RC
50+
coverage: none
51+
experimental: false
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
57+
- name: Setup PHP
58+
uses: shivammathur/setup-php@v2
59+
with:
60+
coverage: ${{ matrix.coverage }}
61+
ini-values: "memory_limit=-1"
62+
php-version: ${{ matrix.php-version }}
63+
tools: composer:${{ matrix.composer-version }}
64+
65+
- name: Validate composer.json
66+
run: composer validate --no-check-lock
67+
68+
- name: Configure Symfony version
69+
run: composer require --no-update symfony/framework-bundle "${{ matrix.symfony-version }}"
70+
71+
- name: Configure composer stability
72+
if: matrix.stability != 'stable'
73+
run: composer config minimum-stability "${{ matrix.stability }}"
74+
75+
- name: Install Composer dependencies
76+
uses: ramsey/composer-install@v1
77+
with:
78+
composer-options: "--prefer-dist"
79+
80+
- name: Setup problem matchers for PHP
81+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
82+
83+
- name: Setup problem matchers for PHPUnit
84+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
85+
86+
- name: Run PHPUnit
87+
if: matrix.coverage == 'none'
88+
run: vendor/bin/phpunit
89+
90+
- name: Run PHPUnit with coverage
91+
if: matrix.coverage != 'none'
92+
run: vendor/bin/phpunit --coverage-clover=coverage.clover
93+
94+
- name: Run PHPStan
95+
run: vendor/bin/phpstan analyse
96+
97+
- name: Upload Scrutinizer coverage
98+
if: matrix.coverage != 'none'
99+
continue-on-error: true
100+
uses: sudo-bot/action-scrutinizer@latest
101+
with:
102+
cli-args: "--format=php-clover coverage.clover"

.travis.yml

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

0 commit comments

Comments
 (0)