Skip to content

Commit f23a827

Browse files
added github actions
1 parent 38f52bd commit f23a827

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/ci.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.operating-system }}
13+
strategy:
14+
matrix:
15+
operating-system: [ubuntu-latest]
16+
php-versions: ['7.1', '7.2', '7.3', '7.4']
17+
18+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-versions }}
26+
extensions: mbstring, intl
27+
ini-values: post_max_size=256M, short_open_tag=On
28+
coverage: xdebug
29+
tools: php-cs-fixer, phpunit
30+
31+
- name: Validate composer.json and composer.lock
32+
run: composer validate --strict
33+
34+
- name: Install dependencies
35+
run: composer install --prefer-dist --no-progress --no-suggest
36+
37+
- name: Check codestyle
38+
run: vendor/bin/php-cs-fixer fix
39+
40+
- name: Run static analysis
41+
run: vendor/bin/phpstan analyze
42+
43+
- name: Run test suite
44+
run: vendor/bin/phpunit
45+
46+
- name: Upload code coverage
47+
env:
48+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
49+
run: bash <(curl -s https://codecov.io/bash)

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# FreeNAS RESTful API (v2) - PHP SDK
22

3+
![Codecov](https://img.shields.io/codecov/c/github/sandwave-io/freenas-php?style=flat-square)
4+
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/sandwave-io/freenas-php/CI?style=flat-square)
5+
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/sandwave-io/freenas?style=flat-square)
6+
![Packagist PHP Version Support](https://img.shields.io/packagist/v/sandwave-io/freenas?style=flat-square)
7+
![Packagist Downloads](https://img.shields.io/packagist/dt/sandwave-io/freenas-php?style=flat-square)
8+
39
This package is built upon the v2.0 of the FreeNAS API.
410
* [FreeNAS API v2.0 REST documentation](https://api.ixsystems.com/freenas/)
511

0 commit comments

Comments
 (0)