This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
generated from Sikessem/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.71 KB
/
ci.yml
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
name: CI
permissions:
contents: read
on: ['push', 'pull_request']
jobs:
ci:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
dependencies: [lowest, highest]
experimental: [false]
name: 👷 CI PHP-${{ matrix.php }} ${{ matrix.dependencies }} on ${{ matrix.os }}
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: 📂 Cache dependencies
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-
- name: ⚡️ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, dom, gd, intl, mbstring, openssl, tokenizer, zip
ini-values: error_reporting=E_ALL
tools: composer:v2, php-cs-fixer, phpunit, vimeo/psalm
coverage: pcov
- name: 🍱 Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
- name: ✅ Check code lint
run: composer lint
- name: ⚗️ Run static analysis
run: |
composer analyse
composer inspect
- name: 🧪 Run unit tests
run: composer test
- name: 🐛 Check all code bugs
run: composer debug