Skip to content

Commit 91b2507

Browse files
committed
- added github workflow
1 parent d9d17e5 commit 91b2507

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
env:
10+
timezone: UTC
11+
REQUIRED_PHP_EXTENSIONS: 'zip'
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
php-version:
20+
- '8.1'
21+
- '8.2'
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Setup PHP ${{ matrix.php-version }} (${{ matrix.os }})
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php-version }}
31+
tools: composer:v2
32+
coverage: pcov
33+
34+
- name: Validate composer.json
35+
run: composer validate --no-check-lock
36+
37+
- name: Get Composer cache directory
38+
id: composer-cache
39+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
40+
41+
- name: Cache Composer packages
42+
uses: actions/cache@v2
43+
with:
44+
path: ${{ steps.composer-cache.outputs.dir }}
45+
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
46+
restore-keys: |
47+
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
48+
composer-${{ runner.os }}-${{ matrix.php-version }}-
49+
composer-${{ runner.os }}-
50+
composer-
51+
52+
- name: Install dependencies
53+
run: composer update -o --prefer-dist --no-progress --no-interaction
54+
55+
- name: Run test suite
56+
run: vendor/bin/phpunit --verbose --coverage-text

0 commit comments

Comments
 (0)