-
Notifications
You must be signed in to change notification settings - Fork 44
91 lines (74 loc) · 2 KB
/
Copy pathbuild.yml
File metadata and controls
91 lines (74 loc) · 2 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Build
on:
pull_request:
branches:
- '*'
push:
branches:
- 'main'
- 'hotfix-*'
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
static-checks:
name: Run static checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.5"
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer update --prefer-dist --no-progress
- name: Run PHP_CodeSniffer
run: vendor/bin/phpcs -sp
- name: Run Psalm
run: vendor/bin/psalm --shepherd
tests:
name: Test on ${{ matrix.os }} php${{ matrix.php-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
os:
- ubuntu
- windows
- macOS
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pcntl, posix, intl
coverage: xdebug
ini-values: error_reporting=E_ALL
- name: Install dependencies
run: composer update --prefer-dist --no-progress
- name: Show Codeception version
run: |
echo "Tested against Codeception **v$(
composer show codeception/codeception --format json | jq -r '.versions[0]'
)**" >> "$GITHUB_STEP_SUMMARY"
shell: bash
- name: Run unit tests tests
run: composer test-unit
- name: Run samples
run: composer test-report-generate
- name: Assert samples
run: composer test-report-check