Skip to content

Commit 2f0043e

Browse files
committed
ci: add test workflow
1 parent c8168a7 commit 2f0043e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'gh-pages'
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * *'
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
name: PHPUnit ${{ matrix.phpunit-version }} on PHP ${{ matrix.php-version }} (Ubuntu 24.04)
15+
runs-on: ubuntu-24.04
16+
permissions:
17+
contents: read
18+
id-token: write
19+
strategy:
20+
matrix:
21+
php-version:
22+
- '8.4'
23+
phpunit-version:
24+
- '12.0'
25+
steps:
26+
- name: Setup PHP ${{ matrix.php-version }}
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php-version }}
30+
coverage: pcov
31+
32+
- name: Checkout Repository
33+
uses: actions/checkout@v4
34+
35+
- name: Require PHPUnit ${{ matrix.phpunit-version }}
36+
run: composer require --dev phpunit/phpunit:^${{ matrix.phpunit-version }} --with-all-dependencies
37+
38+
- name: Install Dependencies
39+
run: composer update --prefer-dist --no-interaction --no-progress
40+
41+
- name: Run PHPUnit ${{ matrix.phpunit-version }}
42+
run: vendor/bin/phpunit --coverage-xml=build/coverage-xml

0 commit comments

Comments
 (0)