Skip to content

Commit 894ee8f

Browse files
authored
Replace Travis CI with GitHub Actions (#377)
* Replace Travis CI with basic GitHub Actions * Add Symfony versions to matrix * Try to use the matrix value correctly * Try to add a job for --prefer-lowest * Fix syntax * Fix matrix definition * Try to restring min versions of PHPUnit * Rename steps; remove Symfony out-of-support versions * Restring Symfony PHPUnit bridge further * Save time by not updating twice in prefer-lowest * Do not change the constraint for the PHPUnit bridge * Fix matrix * Fix matrix; add test against sentry/sentry dev-develop * Fix matrix * Try to fix Syntax * Try to fix Syntax * Last attempt to make continue-on-error work * Another attempt to make continue-on-error work * Add PHP version to latest job * Revert composer.json * Commenti dev-develop step (not ready yet) * Help prefer-lowest by bounding SF versions * Try to add cache * Cache a different folder * Cache other steps too
1 parent da65a60 commit 894ee8f

File tree

2 files changed

+94
-75
lines changed

2 files changed

+94
-75
lines changed

.github/workflows/tests.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
3+
on:
4+
pull_request: null
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
Tests:
11+
runs-on: ubuntu-latest
12+
continue-on-error: ${{ matrix.experimental == true }}
13+
strategy:
14+
matrix:
15+
php:
16+
- '7.4'
17+
- '7.3'
18+
- '7.2'
19+
- '7.1'
20+
sentry_constraint: [false]
21+
symfony_constraint: [false]
22+
experimental: [false]
23+
include:
24+
# - description: 'sentry/sentry dev-develop'
25+
# php: '7.4'
26+
# sentry_constraint: 'dev-develop'
27+
# experimental: true
28+
- description: 'Symfony 4.4'
29+
php: '7.3'
30+
symfony_constraint: 4.4.*
31+
- description: 'Symfony 3.4'
32+
php: '7.1'
33+
symfony_constraint: 3.4.*
34+
env:
35+
SYMFONY_DEPRECATIONS_HELPER: disabled
36+
- description: 'prefer lowest'
37+
php: '7.1'
38+
composer_option: '--prefer-lowest'
39+
symfony_constraint: 3.4.*
40+
env:
41+
SYMFONY_DEPRECATIONS_HELPER: disabled
42+
43+
name: PHP ${{ matrix.php }} tests (${{ matrix.description }})
44+
steps:
45+
- uses: actions/checkout@v2
46+
- uses: actions/cache@v2
47+
with:
48+
path: ~/.composer/cache/files
49+
key: ${{ matrix.php }}-${{ matrix.symfony_constraint }}-${{ matrix.composer_option }}
50+
- uses: shivammathur/setup-php@v1
51+
with:
52+
php-version: ${{ matrix.php }}
53+
coverage: xdebug
54+
- run: |
55+
sed -ri '/symfony\/(monolog-bundle|phpunit-bridge|messenger)/! s/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony_constraint }}'"/' composer.json;
56+
if: matrix.symfony_constraint
57+
- run: composer remove --dev symfony/messenger --no-update
58+
if: matrix.symfony_constraint == '3.4.*'
59+
- run: composer update --no-progress --ansi ${{ matrix.composer_option }}
60+
- run: composer require sentry/sentry dev-develop
61+
if: matrix.sentry_constraint == 'dev-develop'
62+
- run: vendor/bin/phpunit --coverage-clover=coverage.xml
63+
- uses: codecov/codecov-action@v1
64+
with:
65+
file: './coverage.xml'
66+
fail_ci_if_error: true
67+
PHP-CS-Fixer:
68+
runs-on: ubuntu-latest
69+
name: Code style
70+
steps:
71+
- uses: actions/checkout@v2
72+
- uses: actions/cache@v2
73+
with:
74+
path: ~/.composer/cache/files
75+
key: '7.4--'
76+
- uses: shivammathur/setup-php@v1
77+
with:
78+
php-version: '7.4'
79+
- run: composer install --no-progress --ansi
80+
- run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run
81+
PHPStan:
82+
runs-on: ubuntu-latest
83+
name: PHPStan
84+
steps:
85+
- uses: actions/checkout@v2
86+
- uses: actions/cache@v2
87+
with:
88+
path: ~/.composer/cache/files
89+
key: '7.4--'
90+
- uses: shivammathur/setup-php@v1
91+
with:
92+
php-version: '7.4'
93+
- run: composer install --no-progress --ansi
94+
- run: vendor/bin/phpstan analyse

.travis.yml

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

0 commit comments

Comments
 (0)