Skip to content

Commit 600e1fe

Browse files
authored
Merge pull request #119 from Astrotomic/ft-github-actions
switch to GHA
2 parents 889f8b9 + 81d1e17 commit 600e1fe

File tree

5 files changed

+85
-66
lines changed

5 files changed

+85
-66
lines changed

.github/workflows/run-tests.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
php: [7.4, 7.3, 7.2]
16+
laravel: [6.*, 5.8.*]
17+
dependency-version: [prefer-lowest, prefer-stable]
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
include:
20+
- laravel: 6.*
21+
testbench: 4.*
22+
- laravel: 5.8.*
23+
testbench: 3.8.*
24+
exclude:
25+
- php: 7.4
26+
laravel: 5.8.*
27+
28+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v2
33+
34+
- name: Cache dependencies
35+
uses: actions/cache@v1
36+
with:
37+
path: ~/.composer/cache/files
38+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
39+
keys: |
40+
dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-
41+
dependencies-laravel-${{ matrix.laravel }}-php-
42+
dependencies-laravel-
43+
44+
- name: Setup PHP
45+
uses: shivammathur/setup-php@v1
46+
with:
47+
php-version: ${{ matrix.php }}
48+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlit3, pdo_sqlite
49+
coverage: xdebug
50+
51+
- name: Install dependencies
52+
run: |
53+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
54+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
55+
56+
- name: Configure matchers
57+
uses: mheap/phpunit-matcher-action@master
58+
59+
- name: Execute tests
60+
run: vendor/bin/phpunit --teamcity --coverage-text --coverage-clover=coverage.clover
61+
62+
- name: Upload ScrutinizerCI coverage
63+
run: |
64+
php -r "copy('https://scrutinizer-ci.com/ocular.phar', 'ocular.phar');"
65+
php ocular.phar code-coverage:upload --repository="g/Astrotomic/laravel-translatable" --revision="${{ github.sha }}" --format=php-clover coverage.clover
66+
67+
- name: Upload Codecov coverage
68+
uses: codecov/codecov-action@v1
69+
with:
70+
token: ${{ secrets.CODECOV_TOKEN }}
71+
file: ./coverage.clover
72+
flags: unittests
73+
name: P${{ matrix.php }}-L${{ matrix.laravel }}-${{ matrix.dependency-version }}-${{ matrix.os }}-${{ github.sha }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/coverage/
44
/.phpunit.result.cache
55
/build/
6+
/coverage.clover

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build:
1818
tools:
1919
external_code_coverage:
2020
timeout: 900
21-
runs: 4
21+
runs: 1
2222

2323
filter:
2424
paths:

.travis.yml

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

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Introduction
22

3-
[![Latest Version](http://img.shields.io/packagist/v/astrotomic/laravel-translatable.svg?label=Release&style=for-the-badge&cacheSeconds=600)](https://packagist.org/packages/astrotomic/laravel-translatable)
4-
[![MIT License](https://img.shields.io/github/license/Astrotomic/laravel-translatable.svg?label=License&color=blue&style=for-the-badge&cacheSeconds=600)](https://github.com/Astrotomic/laravel-translatable/blob/master/LICENSE)
5-
[![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge&cacheSeconds=600)](https://offset.earth/treeware)
3+
[![Latest Version](http://img.shields.io/packagist/v/astrotomic/laravel-translatable.svg?label=Release&style=for-the-badge)](https://packagist.org/packages/astrotomic/laravel-translatable)
4+
[![MIT License](https://img.shields.io/github/license/Astrotomic/laravel-translatable.svg?label=License&color=blue&style=for-the-badge)](https://github.com/Astrotomic/laravel-translatable/blob/master/LICENSE)
5+
[![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge)](https://offset.earth/treeware)
66

7-
[![TravisCI](https://img.shields.io/travis/Astrotomic/laravel-translatable/master?label=TravisCI&style=flat-square&cacheSeconds=600)](https://travis-ci.org/Astrotomic/laravel-translatable/branches)
7+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Astrotomic/laravel-translatable/run-tests?style=flat-square&logoColor=white&logo=github&label=Tests)](https://github.com/Astrotomic/laravel-translatable/actions?query=workflow%3Arun-tests)
88
[![StyleCI](https://styleci.io/repos/192333549/shield)](https://styleci.io/repos/192333549)
9-
[![ScrutinizerCI](https://img.shields.io/scrutinizer/quality/g/Astrotomic/laravel-translatable/master.svg?label=ScrutinizerCI&style=flat-square&cacheSeconds=600)](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/)
10-
[![Code Climate](https://img.shields.io/codeclimate/maintainability/Astrotomic/laravel-translatable.svg?label=CodeClimate&style=flat-square&cacheSeconds=600)](https://codeclimate.com/github/Astrotomic/laravel-translatable)
11-
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Astrotomic/laravel-translatable/master.svg?label=Coverage&style=flat-square&cacheSeconds=600)](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/)
9+
[![ScrutinizerCI](https://img.shields.io/scrutinizer/quality/g/Astrotomic/laravel-translatable/master.svg?label=Scrutinizer&logoColor=white&logo=scrutinizer-ci&style=flat-square)](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/)
10+
[![Code Climate](https://img.shields.io/codeclimate/maintainability/Astrotomic/laravel-translatable.svg?label=CodeClimate&logoColor=white&logo=code-climate&style=flat-square)](https://codeclimate.com/github/Astrotomic/laravel-translatable)
11+
[![Codecov Coverage](https://img.shields.io/codecov/c/github/Astrotomic/laravel-translatable?logo=codecov&logoColor=white&label=Codecov&style=flat-square)](https://codecov.io/gh/Astrotomic/laravel-translatable)
1212

13-
[![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/laravel-translatable.svg?label=Downloads&style=flat-square&cacheSeconds=600)](https://packagist.org/packages/astrotomic/laravel-translatable)
14-
[![GitBook](https://img.shields.io/badge/GitBook-Astrotomic-7e57c2.svg?style=flat-square&cacheSeconds=600)](https://docs.astrotomic.info/laravel-translatable)
15-
[![Open Collective](https://img.shields.io/opencollective/all/astrotomic?label=Open%20Collective&style=flat-square&cacheSeconds=600)](https://opencollective.com/astrotomic)
13+
[![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/laravel-translatable.svg?label=Downloads&style=flat-square)](https://packagist.org/packages/astrotomic/laravel-translatable)
14+
[![GitBook](https://img.shields.io/badge/GitBook-Astrotomic-7e57c2.svg?style=flat-square)](https://docs.astrotomic.info/laravel-translatable)
15+
[![Open Collective](https://img.shields.io/opencollective/all/astrotomic?label=Open%20Collective&style=flat-square)](https://opencollective.com/astrotomic)
1616

1717
![Laravel Translatable](docs/.gitbook/assets/laravel-translatable.png)
1818

0 commit comments

Comments
 (0)