Skip to content

Commit 4b95970

Browse files
authored
Merge pull request #63 from n1crack/n1crack-patch-1
Create tests.yml
2 parents 2da9805 + 22cb1b2 commit 4b95970

File tree

3 files changed

+49
-5
lines changed

3 files changed

+49
-5
lines changed

.github/workflows/tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
php: [7.1, 7.2, 7.3, 7.4]
17+
18+
name: P${{ matrix.php }}
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
tools: composer:v2
29+
coverage: none
30+
31+
- name: Validate composer.json and composer.lock
32+
run: composer validate
33+
34+
- name: Cache Composer packages
35+
id: composer-cache
36+
uses: actions/cache@v2
37+
with:
38+
path: vendor
39+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-php-
42+
43+
- name: Install dependencies
44+
if: steps.composer-cache.outputs.cache-hit != 'true'
45+
run: composer install --prefer-dist --no-progress --no-suggest
46+
47+
- name: Run test suite
48+
run: vendor/bin/phpunit --verbose

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
}
2626
},
2727
"minimum-stability": "dev",
28+
"prefer-stable": true,
2829
"scripts": {
2930
"test": "vendor/bin/phpunit"
3031
},

phpunit.xml.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
processIsolation="false"
1212
stopOnFailure="false"
1313
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
14-
<coverage>
15-
<include>
16-
<directory suffix=".php">src</directory>
17-
</include>
18-
</coverage>
1914
<testsuites>
2015
<testsuite name="Datatables Test Suite">
2116
<directory>tests/unit</directory>

0 commit comments

Comments
 (0)