Skip to content

Commit

Permalink
Move tests from Codeship CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
iraklisg committed Mar 4, 2021
1 parent b982ede commit 5be7cc3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: run-tests

on: ['push', 'pull_request']

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.4, 8.0]
dependency-version: [prefer-stable]
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: depedencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, exif
coverage: none
- name: Install depedencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: composer test

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Total Downloads][ico-downloads]][link-downloads]
[![Codeship Status for culturegr/presenter](https://app.codeship.com/projects/a02a7370-e759-0137-e629-7a64be8feb0e/status?branch=master)](https://app.codeship.com/projects/373758)
![Github Actions](https://github.com/culturegr/presenter/actions/workflows/run-tests.yml/badge.svg)


This package provides an easy way to create Presenters that can be used to [decorate](https://en.wikipedia.org/wiki/Decorator_pattern) an Eloquent Model. It is heavily inspired by [Hemp Presenter](https://github.com/davidhemphill/presenter) and [Laravel API Resources](https://laravel.com/docs/6.x/eloquent-resources), however it comes with some key differences:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "culturegr/presenter",
"version": "1.0.3",
"version": "1.0.4",
"description": "Eloquent Model Presenter for Laravel applications",
"license": "MIT",
"authors": [
Expand All @@ -16,12 +16,12 @@
"Presenter"
],
"require": {
"illuminate/support": "^6.5|^7.0|^8.0"
"illuminate/support": "^7.0|^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"mockery/mockery": "^1.3",
"orchestra/testbench": "^4.8|^5.2|^6.0",
"orchestra/testbench": "^6.0",
"sempro/phpunit-pretty-print": "^1.2",
"laravel/legacy-factories": "^1.0"
},
Expand Down

0 comments on commit 5be7cc3

Please sign in to comment.