-
Notifications
You must be signed in to change notification settings - Fork 23
58 lines (50 loc) · 1.63 KB
/
phpstan.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
52
53
54
55
56
57
58
name: "AutoReview"
on:
push:
branches:
- "main"
- "master"
pull_request: null
schedule:
- cron: '0 0 1 * *'
jobs:
phpstan:
runs-on: "ubuntu-latest"
name: "PHPStan on PHP ${{ matrix.php }}"
strategy:
fail-fast: false
matrix:
php:
- "8.3"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
tools: "composer"
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
- name: "Perform static analysis"
run: "make phpstan"
# This is a "trick", a meta task which does not change, and we can use in
# the protected branch rules as opposed to the E2E tests one above which
# may change regularly.
# This allows us to mark only this job as required instead of each individual
# ever-changing E2E tests.
validate-tests:
name: "AutoReview Status"
runs-on: "ubuntu-latest"
needs:
- "phpstan"
if: "always()"
steps:
- name: "Successful run"
if: "${{ !(contains(needs.*.result, 'failure')) }}"
run: "exit 0"
- name: "Failing run"
if: "${{ contains(needs.*.result, 'failure') }}"
run: "exit 1"