-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (60 loc) · 1.59 KB
/
ci.yml
File metadata and controls
66 lines (60 loc) · 1.59 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
name: CI
on:
workflow_dispatch:
push:
branches:
- 3.x
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality:
name: Code Quality
uses: craftcms/.github/.github/workflows/code-quality.yml@v3
with:
node_version: '18'
php_version: '8.3'
jobs: '["ecs", "prettier"]'
compatibility:
name: Compatibility (Craft ${{ matrix.craft }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- craft: '^4.6'
flysystem: '^1.0'
- craft: '^5'
flysystem: '^2.0'
services:
mysql:
image: mysql:8.0
ports:
- 33066:3306
env:
MYSQL_DATABASE: db
MYSQL_USER: db
MYSQL_PASSWORD: db
MYSQL_ROOT_PASSWORD: root
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -udb -pdb"
--health-interval=10s
--health-timeout=5s
--health-retries=10
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none
- name: Resolve dependencies
run: composer update "craftcms/cms:${{ matrix.craft }}" "craftcms/flysystem:${{ matrix.flysystem }}" --with-all-dependencies --no-interaction --no-progress --prefer-dist --no-audit
- name: Prepare test environment
run: composer test:init
- name: Run PHPStan
run: composer phpstan
- name: Run unit tests
run: composer test