Skip to content

Commit be92b01

Browse files
committed
Switch CI to Github actions and Codacy
1 parent 27805b7 commit be92b01

File tree

2 files changed

+70
-3
lines changed

2 files changed

+70
-3
lines changed

.github/workflows/run-tests.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
php: [ 7.1, 7.2, 7.3, 7.4 ]
13+
laravel: [ 5.6.*, 5.7.*, 5.8.*, 6.*, 7.*, 8.* ]
14+
dependency-version: [ prefer-stable ]
15+
include:
16+
- laravel: 5.6.*
17+
testbench: 3.6.*
18+
- laravel: 5.7.*
19+
testbench: 3.7.*
20+
- laravel: 5.8.*
21+
testbench: 3.8.*
22+
- laravel: 6.*
23+
testbench: 4.*
24+
- laravel: 7.*
25+
testbench: 5.*
26+
- laravel: 8.*
27+
testbench: 6.*
28+
exclude:
29+
- laravel: 8.*
30+
php: [ 7.1, 7.2 ]
31+
- laravel: 7.*
32+
php: [ 7.1, 7.2 ]
33+
- laravel: 6.*
34+
php: 7.1
35+
36+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v2
41+
42+
- name: Cache dependencies
43+
uses: actions/cache@v2
44+
with:
45+
path: ~/.composer/cache/files
46+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
47+
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@v2
50+
with:
51+
php-version: ${{ matrix.php }}
52+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
53+
coverage: pcov
54+
55+
- name: Install dependencies
56+
run: |
57+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
59+
60+
- name: Execute tests
61+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
62+
63+
- name: Run Codacy Coverage Reporter
64+
uses: codacy/codacy-coverage-reporter-action@master
65+
with:
66+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
67+
coverage-reports: coverage.xml

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
[![GitHub release](https://img.shields.io/github/release/codezero-be/laravel-localized-routes.svg?style=flat-square)](CHANGELOG.md)
44
[![Laravel](https://img.shields.io/badge/laravel-8-red?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com)
55
[![License](https://img.shields.io/packagist/l/codezero/laravel-localized-routes.svg?style=flat-square)](LICENSE.md)
6-
[![Build Status](https://img.shields.io/scrutinizer/build/g/codezero-be/laravel-localized-routes/master?style=flat-square)](https://scrutinizer-ci.com/g/codezero-be/laravel-localized-routes/build-status/master)
7-
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/codezero-be/laravel-localized-routes/master?style=flat-square)](https://scrutinizer-ci.com/g/codezero-be/laravel-localized-routes/?branch=master)
8-
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/quality/g/codezero-be/laravel-localized-routes/master?style=flat-square)](https://scrutinizer-ci.com/g/codezero-be/laravel-localized-routes/?branch=master)
6+
[![Build Status](https://img.shields.io/github/workflow/status/codezero-be/laravel-localized-routes/Tests/master?style=flat-square&logo=github&logoColor=white&label=tests)](https://github.com/codezero-be/laravel-localized-routes/actions)
7+
[![Code Coverage](https://img.shields.io/codacy/coverage/a5db8a1321664e67900c96eadc575ece/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/laravel-localized-routes)
8+
[![Code Quality](https://img.shields.io/codacy/grade/a5db8a1321664e67900c96eadc575ece/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/laravel-localized-routes)
99
[![Total Downloads](https://img.shields.io/packagist/dt/codezero/laravel-localized-routes.svg?style=flat-square)](https://packagist.org/packages/codezero/laravel-localized-routes)
1010

1111
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R3UQ8V)

0 commit comments

Comments
 (0)