-
Notifications
You must be signed in to change notification settings - Fork 15
54 lines (42 loc) · 1.21 KB
/
ci.yml
File metadata and controls
54 lines (42 loc) · 1.21 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
name: CI
on:
push:
branches:
- 2.x
pull_request:
branches:
- '*'
jobs:
Docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build Dockerfile
run: docker build .
cs-stan:
name: Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, intl
tools: cs2pr
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get date part for cache key
id: key-date
run: echo "::set-output name=date::$(date +'%Y-%m')"
- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}
- name: Composer install
run: composer install
- name: Run PHP CodeSniffer
run: vendor/bin/phpcs -q --report=checkstyle src/ | cs2pr