Skip to content

Commit 958ae22

Browse files
committed
Test with github actions
1 parent b261dc1 commit 958ae22

File tree

3 files changed

+50
-24
lines changed

3 files changed

+50
-24
lines changed

.github/workflows/tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
windows_tests:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
php: [7.3, 7.4, 8.0]
15+
16+
name: PHP ${{ matrix.php }}
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Get Composer cache directory
23+
id: composer-cache
24+
run: |
25+
echo "::set-output name=dir::$(composer config cache-files-dir)"
26+
27+
- uses: actions/cache@v2
28+
with:
29+
path: ${{ steps.composer-cache.outputs.dir }}
30+
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-${{ matrix.php }}-composer-
33+
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: ${{ matrix.php }}
38+
extensions: curl
39+
coverage: none
40+
41+
- name: Install dependencies
42+
uses: nick-invision/retry@v1
43+
with:
44+
timeout_minutes: 2
45+
max_attempts: 2
46+
command: composer install --prefer-dist --no-interaction --no-progress --ignore-platform-reqs
47+
48+
- name: Run tests
49+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ build
33
tests/temp
44
composer.phar
55
composer.lock
6+
.phpunit.result.cache

.travis.yml

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

0 commit comments

Comments
 (0)