-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (40 loc) · 1.19 KB
/
build.yml
File metadata and controls
53 lines (40 loc) · 1.19 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
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Build"
on:
pull_request:
push:
branches:
- "main"
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.3"
- "8.4"
steps:
- name: "Checkout"
uses: "actions/checkout@v5"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: "Cache dependencies"
uses: "actions/cache@v4"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"
- name: "Install highest dependencies"
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest"
- name: "Code Style"
run: "vendor/bin/phpcs"
- name: "Static Analysis"
run: "vendor/bin/phpstan analyze"
- name: "Rector"
run: "vendor/bin/rector --dry-run"
- name: "Tests"
run: "vendor/bin/phpunit"