-
Notifications
You must be signed in to change notification settings - Fork 21
87 lines (73 loc) · 2.28 KB
/
ci.yml
File metadata and controls
87 lines (73 loc) · 2.28 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
lint-syntax:
name: Lint syntax (PHP 8.1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli@0
- name: Run syntax checks in dev container
env:
PHP_VERSION: "8.1"
run: |
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash -lc "git ls-files -z '*.php' | xargs -0 -n1 php -l"
static-analysis:
name: Static analysis (PHP 8.1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli@0
- name: Run static analysis in dev container
env:
PHP_VERSION: "8.1"
run: |
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash -lc "composer run lint-static-analysis"
backwards-compatibility:
name: Backwards compatibility (PHP 8.1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli@0
- name: Check backwards compatibility in dev container
env:
PHP_VERSION: "8.1"
run: |
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash -lc "composer install -n --prefer-dist && composer run test-for-bc-breaks || true"
test:
name: Test (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ["8.0", "8.1", "8.2", "8.3", "8.4"]
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli@0
- name: Run test suite in dev container
env:
PHP_VERSION: ${{ matrix.php-version }}
run: |
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash -lc "composer test-quick-fail"