Skip to content

Commit a4ccafb

Browse files
committed
Use GitHub Actions.
1 parent e570a83 commit a4ccafb

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/unit.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
on:
2+
- "pull_request"
3+
- "push"
4+
5+
name: "unit"
6+
7+
permissions:
8+
contents: "read"
9+
10+
jobs:
11+
tests:
12+
name: "Tests"
13+
runs-on: "ubuntu-latest"
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version:
19+
- "8.1"
20+
- "8.2"
21+
- "8.3"
22+
23+
steps:
24+
- name: "Checkout"
25+
uses: "actions/checkout@v3"
26+
27+
- name: "Install PHP with extensions"
28+
uses: "shivammathur/setup-php@v2"
29+
with:
30+
php-version: "${{ matrix.php-version }}"
31+
extensions: "inotify, xdebug"
32+
33+
- name: "Cache dependencies installed with Composer"
34+
uses: "actions/cache@v2"
35+
with:
36+
path: "~/.composer/cache"
37+
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
38+
restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
39+
40+
- name: "Install dependencies with Composer"
41+
run: "composer update --no-ansi --no-interaction --no-progress"
42+
43+
- name: "Add properties to the kernel"
44+
run: "bin/plaisio --no-ansi plaisio:kernel-properties"
45+
46+
- name: "Run tests with PHPUnit"
47+
run: "bin/phing unit"
48+
49+
- name: "Upload to Codecov"
50+
uses: "codecov/codecov-action@v2"
51+
with:
52+
files: "test/coverage.xml"
53+
verbose: true

0 commit comments

Comments
 (0)