Skip to content

Commit 3a2d002

Browse files
Create tests.yml
1 parent e0932c5 commit 3a2d002

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Tests
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
ci:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
php: ['8.2', '8.3']
13+
dependency-version: [prefer-lowest, prefer-stable]
14+
15+
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
16+
17+
steps:
18+
- name: Set git to use LF
19+
run: |
20+
git config --global core.autocrlf false
21+
git config --global core.eol lf
22+
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
extensions: fileinfo
31+
tools: composer:v2
32+
coverage: pcov
33+
34+
- name: Setup Problem Matches
35+
run: |
36+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
37+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
38+
39+
- name: Install Composer dependencies
40+
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist --ansi
41+
42+
- name: Style Testing
43+
run: vendor/bin/pint --test --ansi
44+
45+
- name: Unit Testing
46+
run: vendor/bin/pest

0 commit comments

Comments
 (0)