Skip to content

Commit

Permalink
Migrate CI from Travis to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Nov 21, 2024
1 parent 7557775 commit 4c802d0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 34 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
pull_request: ~
push:
branches:
- master
schedule:
- cron: "47 6 * * 1" # once a month, to surface issues with newer dependencies

jobs:
Tests:
runs-on: 'ubuntu-latest'
strategy:
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
dependencies: ['highest']
include:
- description: '(lowest)'
php: '7.4'
dependencies: 'lowest'

name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: "Install dependencies"
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: "Run PHPStan analysis"
run: composer phpstan
- name: "Run tests"
run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always
- name: "Upload test coverage"
uses: codecov/codecov-action@v5
with:
files: './coverage.xml'
fail_ci_if_error: true
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

0 comments on commit 4c802d0

Please sign in to comment.