Skip to content

Commit 14397e5

Browse files
committed
ci: add dependency-analysis workflow
1 parent 40e5be9 commit 14397e5

File tree

6 files changed

+83
-4
lines changed

6 files changed

+83
-4
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
os:
7575
- ubuntu-latest
7676
php-version:
77-
- '8.2'
77+
- '8.1'
7878
dependencies:
7979
- locked
8080
permissions:
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
3+
name: 🔐 Dependency analysis
4+
5+
on: # yamllint disable-line rule:truthy
6+
pull_request:
7+
paths:
8+
- 'src/**'
9+
- 'tests/**'
10+
- '.php-cs-fixer.dist.php'
11+
- 'composer.json'
12+
- 'composer.lock'
13+
push:
14+
paths:
15+
- 'src/**'
16+
- 'tests/**'
17+
- '.php-cs-fixer.dist.php'
18+
- 'composer.json'
19+
- 'composer.lock'
20+
21+
jobs:
22+
dependency-analysis:
23+
timeout-minutes: 4
24+
runs-on: ${{ matrix.os }}
25+
concurrency:
26+
cancel-in-progress: true
27+
group: dependency-analysis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+
strategy:
29+
fail-fast: true
30+
matrix:
31+
os:
32+
- ubuntu-latest
33+
php-version:
34+
- '8.1'
35+
dependencies:
36+
- locked
37+
38+
steps:
39+
- name: 📦 Check out the codebase
40+
uses: actions/checkout@v4.1.5
41+
42+
- name: 🛠️ Setup PHP
43+
uses: shivammathur/setup-php@2.30.4
44+
with:
45+
php-version: ${{ matrix.php-version }}
46+
extensions: none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets
47+
ini-values: error_reporting=E_ALL
48+
coverage: none
49+
tools: phive
50+
51+
- name: 🛠️ Setup problem matchers
52+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
53+
54+
- name: 🤖 Validate composer.json and composer.lock
55+
run: composer validate --ansi --strict
56+
57+
- name: 🔍 Get composer cache directory
58+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
59+
60+
- name: ♻️ Restore cached dependencies installed with composer
61+
uses: actions/cache@v4.0.2
62+
with:
63+
path: ${{ env.COMPOSER_CACHE_DIR }}
64+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
65+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
66+
67+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
68+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
69+
with:
70+
dependencies: ${{ matrix.dependencies }}
71+
72+
- name: 📥 Install dependencies with phive
73+
uses: wayofdev/gh-actions/actions/phive/install@3.1.0
74+
with:
75+
phive-home: '.phive'
76+
trust-gpg-keys: 0xC00543248C87FB13,0x033E5F8D801A2F8D
77+
78+
- name: 🔬 Run maglnet/composer-require-checker
79+
run: .phive/composer-require-checker check --ansi --config-file="$(pwd)/composer-require-checker.json" --verbose

.github/workflows/security-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
os:
2020
- ubuntu-latest
2121
php-version:
22-
- '8.2'
22+
- '8.1'
2323
dependencies:
2424
- locked
2525
steps:

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
os:
3434
- ubuntu-latest
3535
php-version:
36-
- '8.2'
36+
- '8.1'
3737
dependencies:
3838
- locked
3939
steps:

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
os:
2424
- ubuntu-latest
2525
php-version:
26-
- '8.2'
26+
- '8.1'
2727
dependencies:
2828
- locked
2929
steps:

0 commit comments

Comments
 (0)