-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (55 loc) · 1.6 KB
/
build.yml
File metadata and controls
74 lines (55 loc) · 1.6 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
# 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.4"
- "8.5"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: "Cache dependencies"
uses: "actions/cache@v5"
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"
- name: "Composer Normalizer"
run: "composer normalize --dry-run"
release:
name: "Release"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run semantic-release
id: semantic
uses: cycjimmy/semantic-release-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}