Skip to content

Commit 7e631db

Browse files
authored
Merge pull request #519 from emielmolenaar/feat/github-actions
Adding Github actions, removing Travis CI
2 parents abf4c86 + 41a445d commit 7e631db

File tree

3 files changed

+47
-15
lines changed

3 files changed

+47
-15
lines changed

.github/workflows/run-tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "*"
10+
schedule:
11+
- cron: '0 0 * * *'
12+
13+
jobs:
14+
php-tests:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
env:
18+
COMPOSER_NO_INTERACTION: 1
19+
20+
strategy:
21+
matrix:
22+
php: [8.0, 7.4, 7.3, 7.2, 7.1]
23+
24+
name: P${{ matrix.php }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
coverage: none
35+
tools: composer:v2
36+
37+
- name: Install dependencies
38+
run: |
39+
composer install -o --quiet
40+
41+
- name: Execute Unit Tests
42+
run: composer test

.travis.yml

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

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,10 @@
4141
"Kalnoy\\Nestedset\\NestedSetServiceProvider"
4242
]
4343
}
44+
},
45+
"scripts": {
46+
"test": [
47+
"@php ./vendor/bin/phpunit"
48+
]
4449
}
4550
}

0 commit comments

Comments
 (0)