Skip to content

Commit 4c802d0

Browse files
committed
Migrate CI from Travis to Github Actions
1 parent 7557775 commit 4c802d0

File tree

2 files changed

+50
-34
lines changed

2 files changed

+50
-34
lines changed

.github/workflows/tests.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
schedule:
9+
- cron: "47 6 * * 1" # once a month, to surface issues with newer dependencies
10+
11+
jobs:
12+
Tests:
13+
runs-on: 'ubuntu-latest'
14+
strategy:
15+
matrix:
16+
php:
17+
- '7.4'
18+
- '8.0'
19+
- '8.1'
20+
- '8.2'
21+
- '8.3'
22+
- '8.4'
23+
dependencies: ['highest']
24+
include:
25+
- description: '(lowest)'
26+
php: '7.4'
27+
dependencies: 'lowest'
28+
29+
name: PHP ${{ matrix.php }} ${{ matrix.description }}
30+
steps:
31+
- name: "Checkout"
32+
uses: actions/checkout@v4
33+
- name: "Install PHP"
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php }}
37+
coverage: xdebug
38+
- name: "Install dependencies"
39+
uses: ramsey/composer-install@v3
40+
with:
41+
dependency-versions: ${{ matrix.dependencies }}
42+
- name: "Run PHPStan analysis"
43+
run: composer phpstan
44+
- name: "Run tests"
45+
run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always
46+
- name: "Upload test coverage"
47+
uses: codecov/codecov-action@v5
48+
with:
49+
files: './coverage.xml'
50+
fail_ci_if_error: true

.travis.yml

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

0 commit comments

Comments
 (0)