Skip to content

Commit 6fb3496

Browse files
committed
#3 Github workflow
1 parent 0f07496 commit 6fb3496

File tree

5 files changed

+79
-5
lines changed

5 files changed

+79
-5
lines changed

Diff for: .gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/tests/ export-ignore
2+
/phpunit.xml export-ignore
3+
.* export-ignore
4+
CONTRIBUTING.md export-ignore
5+
6+
# Set the line ending configuration
7+
* text=lf

Diff for: .github/workflows/test.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "PHPUnit testing"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
tests:
11+
name: Tests
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
php:
17+
- 7.4
18+
- 8.0
19+
fail-fast: false
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
30+
- name: Cache PHP dependencies
31+
uses: actions/cache@v2
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
35+
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-
36+
37+
- name: Install dependencies
38+
run: composer install --prefer-dist --no-progress --no-suggest
39+
40+
- name: Tests
41+
run: composer test

Diff for: CONTRIBUTING.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing to this package
2+
3+
Looking to contribute something to this library? Here's how you can help.
4+
5+
## Bugs
6+
7+
A bug is a demonstrable problem that is caused by the code in the repository. Good bug reports are extremely helpful – thank you!
8+
9+
Please try to be as detailed as possible in your report. Include specific information about the environment – version of PHP, version of the package, tracking code lines, etc, and steps required to reproduce the issue.
10+
11+
If the error is not informative enough, nor is not easy to reproduce it will be closed.
12+
13+
## Pull Requests
14+
15+
Good pull requests – patches, improvements, new features – are a fantastic help. Before create a pull request, please follow these instructions:
16+
17+
* The code must be PSR-2 compliant.
18+
* The code must be well commented.
19+
* The code must pass all existing tests.
20+
* The pull request must come with additional tests covering its functionality.

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Status Addon (for Wordpress MVC)
22

33
[![Latest Stable Version](https://poser.pugx.org/10quality/wpmvc-addon-status/v/stable)](https://packagist.org/packages/10quality/wpmvc-addon-status)
4+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/10quality/wpmvc-addon-status/test.yml)
45
[![Total Downloads](https://poser.pugx.org/10quality/wpmvc-addon-status/downloads)](https://packagist.org/packages/10quality/wpmvc-addon-status)
56
[![License](https://poser.pugx.org/10quality/wpmvc-addon-status/license)](https://packagist.org/packages/10quality/wpmvc-addon-status)
67

Diff for: composer.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
"10quality/wpmvc-core": ">=3.1.0",
99
"10quality/wpmvc-addon": "1.0.*"
1010
},
11+
"require-dev": {
12+
"10quality/wpmvc-addon-testsuite": "dev-main",
13+
"phpunit/phpunit": "9.*"
14+
},
1115
"autoload": {
1216
"psr-4": {
1317
"WPMVC\\Addons\\Status\\": "addon/"
1418
}
1519
},
16-
"minimum-stability": "dev",
17-
"require-dev": {
18-
"10quality/wpmvc-addon-testsuite": "dev-main",
19-
"phpunit/phpunit": "9.*"
20-
}
20+
"scripts": {
21+
"test": [
22+
"phpunit"
23+
]
24+
},
25+
"minimum-stability": "dev"
2126
}

0 commit comments

Comments
 (0)