Skip to content

Commit

Permalink
Added GHA workflow for tests.
Browse files Browse the repository at this point in the history
Removed Travis configuration.
  • Loading branch information
Bilge committed Jul 19, 2024
1 parent 07ddeba commit d9fde4d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 34 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/Test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 6 * * *

jobs:
Test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php:
- 8.1
- 8.2
- 8.3

steps:
- uses: actions/checkout@v4

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug

- name: Validate composer.json
run: composer validate

- name: Cache dependencies
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: php-${{ matrix.php }}

- name: Install dependencies
run: composer update --no-interaction --no-progress

- name: Run test suite with coverage
run: composer test -- --coverage-clover=build/logs/clover.xml

- name: Upload test coverage
run: bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.*/
!/.github/
/vendor/
/composer.lock
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

0 comments on commit d9fde4d

Please sign in to comment.