Skip to content

Commit 84b8518

Browse files
committed
Add GitHub action
1 parent 9cb9b69 commit 84b8518

File tree

2 files changed

+76
-2
lines changed

2 files changed

+76
-2
lines changed

.github/workflows/tests.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: 'ubuntu-latest'
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: ['7.4']
14+
laravel: ['5.8', '6.0', '7.0']
15+
include:
16+
- laravel: '7.0'
17+
testbench: '5.2'
18+
- laravel: '6.0'
19+
testbench: '4.8'
20+
- laravel: '5.8'
21+
testbench: '3.8.6'
22+
23+
name: Laravel ${{ matrix.laravel }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v2
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: ctype, dom, json, mbstring, openssl, xml, zip, zlib
34+
coverage: xdebug
35+
36+
- name: Get Composer Cache Directory
37+
id: composer-cache
38+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
39+
40+
- name: Cache dependencies
41+
uses: actions/cache@v2
42+
with:
43+
path: ${{ steps.composer-cache.outputs.dir }}
44+
key: ${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
45+
46+
- name: Install dependencies
47+
run: |
48+
composer require "laravel/framework:^${{ matrix.laravel }}" "orchestra/testbench:^${{ matrix.testbench }}" --no-interaction --no-update
49+
composer update --prefer-dist --no-interaction --no-suggest
50+
51+
- name: Setup Problem Matchers for PHPUnit
52+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
53+
54+
- name: Execute tests
55+
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml --log-junit=test-report.xml
56+
57+
- name: Upload code coverage
58+
uses: codecov/codecov-action@v1
59+
with:
60+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
A Laravel package for the [Firebase PHP Admin SDK](https://github.com/kreait/firebase-php).
44

55
[![Current version](https://img.shields.io/packagist/v/kreait/laravel-firebase.svg?logo=composer)](https://packagist.org/packages/kreait/laravel-firebase)
6-
[![GitHub license](https://img.shields.io/github/license/kreait/laravel-firebase.svg)](https://github.com/kreait/laravel-firebase/blob/main/LICENSE)
6+
[![Monthly Downloads](https://img.shields.io/packagist/dm/kreait/laravel-firebase.svg)](https://packagist.org/packages/kreait/laravel-firebase/stats)
7+
[![Total Downloads](https://img.shields.io/packagist/dt/kreait/laravel-firebase.svg)](https://packagist.org/packages/kreait/laravel-firebase/stats)
8+
[![Tests](https://github.com/kreait/laravel-firebase/workflows/Tests/badge.svg?branch=main)](https://github.com/kreait/laravel-firebase/actions)
9+
[![codecov](https://codecov.io/gh/kreait/laravel-firebase/branch/main/graph/badge.svg)](https://codecov.io/gh/kreait/laravel-firebase)
710
[![Discord](https://img.shields.io/discord/523866370778333184.svg?color=7289da&logo=discord)](https://discord.gg/nbgVfty)
811
[![Sponsor](https://img.shields.io/static/v1?logo=GitHub&label=Sponsor&message=%E2%9D%A4&color=ff69b4)](https://github.com/sponsors/jeromegamez)
912

1013
* [Installation](#installation)
1114
* [Configuration](#configuration)
1215
* [Usage](#usage)
1316
* [Documentation](https://firebase-php.readthedocs.io/)
17+
- [Support](#support)
18+
- [License](#license)
1419

1520
## Installation
1621

@@ -97,6 +102,15 @@ for further information on how to use it.
97102
**You don't need and should not use the `new Factory()` pattern described in the SDK documentation, this is already
98103
done for you with the Laravel Service Provider. Use Dependency Injection, the Facades or the `app()` helper instead**
99104

105+
## Support
106+
107+
- [Issue Tracker (Laravel Package)](https://github.com/kreait/laravel-firebase/issues/)
108+
- [Issue Tracker (Admin SDK)](https://github.com/kreait/firebase-php/issues/)
109+
- [Discord Chat](https://discord.gg/nbgVfty)
110+
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase+php)
111+
100112
## License
101113

102-
The MIT License (MIT). Please see [License File](LICENSE) for more information.
114+
Firebase Admin PHP SDK is licensed under the [MIT License](LICENSE).
115+
116+
Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/).

0 commit comments

Comments
 (0)