Skip to content

Commit f342143

Browse files
authored
Add GitHub actions (#28)
* add tests to composer runnable scripts * Add php workflow github actions
1 parent 95adad5 commit f342143

5 files changed

Lines changed: 46 additions & 27 deletions

File tree

.github/workflows/php.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
php-versions: ['7.4', '8.0', '8.1']
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Validate composer.json and composer.lock
23+
run: composer validate --strict
24+
25+
- name: Cache Composer packages
26+
id: composer-cache
27+
uses: actions/cache@v3
28+
with:
29+
path: vendor
30+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-php-
33+
- name: Install dependencies
34+
run: composer install --prefer-dist --no-progress
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php-versions }}
40+
- name: Run Tests
41+
run: composer run-script test

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
Unstructured Text Parser [PHP]
22
===========================================
3-
[![Build Status](https://travis-ci.org/aymanrb/php-unstructured-text-parser.svg?branch=master)](https://travis-ci.org/aymanrb/php-unstructured-text-parser)
3+
[![Tests](https://github.com/aymanrb/php-unstructured-text-parser/actions/workflows/php.yml/badge.svg)](https://github.com/aymanrb/php-unstructured-text-parser/actions/workflows/php.yml)
44
[![Coverage Status](https://coveralls.io/repos/github/aymanrb/php-unstructured-text-parser/badge.svg?branch=master)](https://coveralls.io/github/aymanrb/php-unstructured-text-parser?branch=master)
55
[![Latest Stable Version](https://poser.pugx.org/aymanrb/php-unstructured-text-parser/v/stable.svg)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)
66
[![Latest Unstable Version](https://poser.pugx.org/aymanrb/php-unstructured-text-parser/v/unstable.svg)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)
77
[![Total Downloads](https://poser.pugx.org/aymanrb/php-unstructured-text-parser/downloads)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)
88
[![License](https://poser.pugx.org/aymanrb/php-unstructured-text-parser/license.svg)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)
99

10-
11-
1210
About Unstructured Text Parser
1311
----------------------------------
1412
This is a small PHP library to help extract text out of documents that are not structured in a processing friendly format.

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"php": "7.4.0"
1616
}
1717
},
18-
"version": "2.2.0",
1918
"type": "library",
2019
"license": "MIT",
2120
"authors": [
@@ -54,5 +53,8 @@
5453
"require-dev": {
5554
"phpunit/phpunit": "^8.4",
5655
"php-coveralls/php-coveralls": "^2.1"
56+
},
57+
"scripts": {
58+
"test": "phpunit tests"
5759
}
5860
}

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)