forked from lucciano/phystrix
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.53 KB
/
testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Testing
on:
push:
branches: [ 'master' ]
pull_request:
types: [ 'opened', 'synchronize', 'reopened' ]
jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
env:
extensions: apcu, bcmath, gd, redis-phpredis/[email protected], sqlite, pdo_sqlite
steps:
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ env.extensions }}
coverage: xdebug
ini-values: apc.enable_cli=1
- name: Checkout
uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Install Dependencies
run: composer install --prefer-dist
- name: Check code style
run: ./vendor/bin/phpcs
- name: Testing
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: php-${{ matrix.php-version }}
run: ./vendor/bin/php-coveralls --coverage_clover=coverage.xml -v
coveralls-finish:
needs: [testing]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true