Skip to content

Commit aac7c60

Browse files
authored
Merge pull request #2 from xepozz/ci
Add CI
2 parents 47b197b + 73e15b7 commit aac7c60

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/phpunit.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
pull_request:
3+
push:
4+
5+
name: "PHPUnit"
6+
7+
jobs:
8+
phpunit:
9+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os:
14+
- ubuntu-latest
15+
php:
16+
- "8.0"
17+
- "8.1"
18+
- "8.2"
19+
- "8.3"
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2.3.4
23+
24+
- name: Install PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
tools: composer:v2
29+
coverage: pcov
30+
31+
- name: Install dependencies
32+
run: composer install
33+
34+
- name: Run tests with code coverage.
35+
run: php -ddisable_functions=time vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always
36+
37+
- name: Upload coverage to Codecov.
38+
if: matrix.os == 'ubuntu-latest'
39+
uses: codecov/codecov-action@v3
40+
with:
41+
files: ./coverage.xml

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
The package helps mock internal php functions as simple as possible. Use this package when you need mock such
44
functions as: `time()`, `str_contains()`, `rand`, etc.
55

6+
[![Latest Stable Version](https://poser.pugx.org/xepozz/internal-mocker/v/stable.svg)](https://packagist.org/packages/xepozz/internal-mocker)
7+
[![Total Downloads](https://poser.pugx.org/xepozz/internal-mocker/downloads.svg)](https://packagist.org/packages/xepozz/internal-mocker)
8+
[![phpunit](https://github.com/xepozz/internal-mocker/workflows/PHPUnit/badge.svg)](https://github.com/xepozz/internal-mocker/actions)
9+
610
## Installation
711

812
```bash

0 commit comments

Comments
 (0)