Skip to content

Commit 11535ac

Browse files
committed
Test Github actions
1 parent 2052aef commit 11535ac

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
php: [7.2, 7.3, 7.4]
16+
stability: [prefer-lowest, prefer-stable]
17+
18+
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Cache dependencies
25+
uses: actions/cache@v1
26+
with:
27+
path: ~/.composer/cache/files
28+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
#extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
35+
coverage: none #TODO: set coverage
36+
37+
#- name: Setup Memcached
38+
# uses: niden/actions-memcached@v7
39+
40+
- name: Install dependencies
41+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
42+
43+
- name: Execute tests
44+
run: phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.clover --verbose
45+
#env:
46+
# DB_PORT: ${{ job.services.mysql.ports[3306] }}
47+
# DB_USERNAME: root
48+
49+
50+
#- uses: actions/checkout@v1
51+
#- uses: php-actions/composer@v1
52+
#- uses: php-actions/phpunit@v1

0 commit comments

Comments
 (0)