-
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (83 loc) · 2.65 KB
/
ci.yaml
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
92
93
94
95
96
97
98
99
100
101
102
103
name: "CI"
on:
pull_request:
types: [ "opened", "synchronize", "edited", "reopened" ]
paths-ignore:
- "docs/**"
push:
branches:
- "**"
paths-ignore:
- "docs/**"
schedule:
- cron: "0 8 * * 1" # At 08:00 on Monday
workflow_dispatch:
inputs: {}
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: "read"
jobs:
coding-standard:
name: "Coding standard"
runs-on: "${{ matrix.operating-system }}"
if: |
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
include:
- operating-system: "ubuntu-latest"
php-version: "8.3"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
with:
version: "${{ matrix.php-version }}"
token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Composer"
uses: "orisai/github-workflows/.github/actions/setup-composer@v1"
- name: "PHP_CodeSniffer"
uses: "orisai/github-workflows/.github/actions/php-codesniffer@v1"
with:
command: "make cs ARGS='--report=checkstyle -q | vendor/bin/cs2pr'"
cache-path: "var/tools/PHP_CodeSniffer"
static-analysis:
name: "Static analysis"
runs-on: "${{ matrix.operating-system }}"
if: |
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
include:
- operating-system: "ubuntu-latest"
php-version: "8.3"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
with:
version: "${{ matrix.php-version }}"
token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Composer"
uses: "orisai/github-workflows/.github/actions/setup-composer@v1"
- name: "PHPStan"
uses: "orisai/github-workflows/.github/actions/phpstan@v1"
with:
command: "make phpstan"
cache-path: "var/tools/PHPStan"
status-check:
name: "Status check - ${{ github.workflow }}"
runs-on: "ubuntu-latest"
needs: [ "coding-standard", "static-analysis" ]
if: "${{ always() }}"
steps:
- name: "Check required jobs are successful"
uses: "orisai/github-workflows/.github/actions/status-check@v1"
with:
needs: "${{ toJSON(needs) }}"