Skip to content

Commit 54c060f

Browse files
Created build workflow
Multi-version testing with coverage. Static analysis commented out until I get that set up.
1 parent 1e2a2ee commit 54c060f

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
strategy:
13+
matrix:
14+
php: ['5.4', '7.3', '7.4', '8.0']
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: shivammathur/setup-php@2.11.0
20+
with:
21+
php-version: ${{ matrix.php }}
22+
extensions: 'xdebug'
23+
24+
- uses: actions/checkout@v2
25+
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate --strict
28+
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v2
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-php-
37+
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress
40+
41+
- name: Run Test Suite
42+
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit tests --coverage-filter src --coverage-text
43+
44+
#- name: Run Static Analysis
45+
# run: ./vendor/bin/psalm

0 commit comments

Comments
 (0)