-
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (41 loc) · 1.25 KB
/
php-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
name: PHP CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: PHP ${{ matrix.php_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php_version:
- '7.3'
- '7.4'
- '8.0'
steps:
- uses: actions/checkout@v4
- name: Use PHP ${{ matrix.php_version }}
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php_version }}
# extension-csv: xdebug, mbstring, curl, zip, dom, simplexml, intl, mysql
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Lint
run: composer run lint
# - name: Test
# run: composer run test
# env:
# DB_PORT: ${{ job.services.mysql.ports['3306'] }}