Skip to content

Commit ac96dfa

Browse files
committed
ci
1 parent b8c16e4 commit ac96dfa

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: UnitTest
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
# PHP
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: ${{ matrix.php-versions }}
18+
# extensions: mbstring
19+
- name: Get composer cache directory
20+
id: composercache
21+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
22+
- name: Cache composer dependencies
23+
uses: actions/cache@v2
24+
with:
25+
path: ${{ steps.composercache.outputs.dir }}
26+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
27+
restore-keys: ${{ runner.os }}-composer-
28+
- name: Install dependencies
29+
run: composer update --prefer-dist --prefer-stable --no-progress --no-suggest --ignore-platform-reqs
30+
31+
- name: Run test suite
32+
run: php vendor/bin/phpunit --configuration phpunit.ci.xml

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.*
33
!.gitignore
44
!.travis.yml
5+
!.github
56

67
# Composer
78
/vendor/*

0 commit comments

Comments
 (0)