-
Notifications
You must be signed in to change notification settings - Fork 19
74 lines (62 loc) · 2.38 KB
/
unit-tests.yaml
File metadata and controls
74 lines (62 loc) · 2.38 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: Unit Tests
on:
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
workflow_call:
workflow_dispatch:
jobs:
lint_files:
uses: llaville/.github/.github/workflows/mega-linter.yml@master
with:
repository: ${{ github.repository }}
unit_tests:
needs: lint_files
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
php: 8.1
continue-on-error: false
- os: ubuntu-22.04
php: 8.2
continue-on-error: false
- os: ubuntu-22.04
php: 8.3
continue-on-error: false
- os: ubuntu-22.04
php: 8.4
continue-on-error: false
name: Unit Tests
env:
APP_ENV: dev # see explains at https://github.com/llaville/php-compatinfo-db/issues/101
DATABASE_URL: "sqlite:///%kernel.cache_dir%/compatinfo-db.sqlite"
steps:
- # https://github.com/actions/checkout
name: Checkout
uses: actions/checkout@v4
- # https://github.com/shivammathur/setup-php
name: Setup PHP runtime
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json,pcre,pdo,phar,spl,mbstring,sqlite
- # https://github.com/ramsey/composer-install
name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
composer-options: "--prefer-dist"
- # https://github.com/llaville/php-compatinfo-db
name: Build Database
run: |
bin/phpcompatinfo db:new --ansi
- # https://github.com/sebastianbergmann/phpunit/tree/10.5
name: Unit tests with PHPUnit 10
run: vendor/bin/phpunit --group features,large,reference,regression,default --do-not-cache-result --no-progress
continue-on-error: ${{ matrix.continue-on-error }}