Skip to content

Commit 236ca95

Browse files
committed
feat: add stan workflow
1 parent 6db4610 commit 236ca95

File tree

5 files changed

+83
-0
lines changed

5 files changed

+83
-0
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on: # yamllint disable-line rule:truthy
99
name: 🧹 Fix PHP coding standards
1010

1111
env:
12+
# Disable docker support in Makefile
1213
APP_RUNNER: 'cd app &&'
1314

1415
jobs:

.github/workflows/deploy-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on: # yamllint disable-line rule:truthy
88
name: 🚀 Deploy to production
99

1010
env:
11+
# Disable docker support in Makefile
1112
APP_RUNNER: 'cd app &&'
1213

1314
concurrency: production

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on: # yamllint disable-line rule:truthy
88
name: 🚀 Deploy to staging
99

1010
env:
11+
# Disable docker support in Makefile
1112
APP_RUNNER: 'cd app &&'
1213

1314
concurrency: staging

.github/workflows/security-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on: # yamllint disable-line rule:truthy
99
name: 🔐 Security analysis
1010

1111
env:
12+
# Disable docker support in Makefile
1213
APP_RUNNER: 'cd app &&'
1314

1415
jobs:

.github/workflows/static-analysis.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
branches:
6+
- master
7+
- develop
8+
paths:
9+
- 'app/config/**'
10+
- 'app/src/**'
11+
- 'app/tests/**'
12+
- 'app/.php-cs-fixer.dist.php'
13+
- 'app/composer.json'
14+
- 'app/composer.lock'
15+
- 'app/phpstan.neon.dist'
16+
- 'app/phpstan-baseline.neon'
17+
- 'app/psalm.xml'
18+
- 'app/psalm-baseline.xml'
19+
20+
name: 🔍 Static analysis
21+
22+
env:
23+
# Disable docker support in Makefile
24+
APP_RUNNER: 'cd app &&'
25+
26+
jobs:
27+
stan:
28+
timeout-minutes: 4
29+
runs-on: ${{ matrix.os }}
30+
concurrency:
31+
cancel-in-progress: true
32+
group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
33+
strategy:
34+
fail-fast: true
35+
matrix:
36+
os:
37+
- ubuntu-latest
38+
php-version:
39+
- '8.3'
40+
dependencies:
41+
- locked
42+
steps:
43+
- name: 📦 Check out the codebase
44+
uses: actions/checkout@v4.1.6
45+
46+
- name: 🛠️ Setup PHP
47+
uses: shivammathur/setup-php@2.30.4
48+
with:
49+
php-version: ${{ matrix.php-version }}
50+
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql
51+
ini-values: error_reporting=E_ALL
52+
coverage: none
53+
54+
- name: 🛠️ Setup problem matchers
55+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
56+
57+
- name: 🤖 Validate composer.json and composer.lock
58+
run: make validate-composer
59+
60+
- name: 🔍 Get composer cache directory
61+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
62+
with:
63+
working-directory: app
64+
65+
- name: ♻️ Restore cached dependencies installed with composer
66+
uses: actions/cache@v4.0.2
67+
with:
68+
path: ${{ env.COMPOSER_CACHE_DIR }}
69+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
70+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
71+
72+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
73+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
74+
with:
75+
working-directory: app
76+
dependencies: ${{ matrix.dependencies }}
77+
78+
- name: 🔍 Run static analysis using phpstan/phpstan
79+
run: make lint-stan-ci

0 commit comments

Comments
 (0)