-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (31 loc) · 1.22 KB
/
tests.yaml
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
name: Tests
on:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Note: 8.2+ is required only for the test tools, not for the package's code itself.
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, opcache
- name: Install Composer
run: |
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
- name: Install composer packages for code-quality
run: cd ${{ github.workspace }}/code-quality; composer install
- name: Validate code style with PHP Code Sniffer
run: cd ${{ github.workspace }}/code-quality; composer phpcs
- name: Perform static code analysis with PHPStan
run: cd ${{ github.workspace }}/code-quality; composer phpstan
- name: Generate package autoloader files
run: cd ${{ github.workspace }}; composer install
- name: Install composer packages for tests
run: cd ${{ github.workspace }}/tests; composer install
- name: Run Pest tests
run: cd ${{ github.workspace }}/tests; composer pest