Skip to content

Commit 93af93c

Browse files
committed
Improve workflow
- Split workflow files and use Rollerscapes Inspector for CS - Update issue templates - Don't cache vcs in workflow
1 parent 70da987 commit 93af93c

10 files changed

Lines changed: 277 additions & 120 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "\U0001F41B Bug Report"
3+
about: Report errors and problems
4+
title: "[bug] "
5+
labels: Potential Bug
6+
assignees: ''
7+
8+
---
9+
10+
**Version(s) affected**: x.y.z
11+
12+
**Description**
13+
<!-- A clear and concise description of the problem. -->
14+
15+
**How to reproduce**
16+
<!-- Code and/or config needed to reproduce the problem. -->
17+
18+
**Possible Solution**
19+
<!--- Optional: only if you have suggestions on a fix/reason for the bug -->
20+
21+
**Additional context**
22+
<!-- Optional: any other context about the problem: log messages, screenshots, etc. -->
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: "\U0001F680 Feature Request"
3+
about: "I have a suggestion (and may want to implement it \U0001F642)!"
4+
title: "[Feature] "
5+
labels: Feature
6+
assignees: ''
7+
8+
---
9+
10+
**Description**
11+
<!-- A clear and concise description of the new feature. -->
12+
13+
**Example**
14+
<!-- A simple example of the new feature in action (include PHP code, YAML config, etc.)
15+
If the new feature changes an existing feature, include a simple before/after comparison. -->
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 👩‍🏫 Support Question
3+
about: Questions about using this library
4+
labels: Question / Support
5+
6+
---
7+
8+
**Description**
9+
<!-- A clear and concise description of the problem. Also include what you tried, and any code
10+
snippets if you have them.
11+
12+
Please be patient, it may take some to get a response. Thanks.
13+
14+
Please also note that this project is released with a Contributor Code of Conduct.
15+
By participating in this project you agree to abide by its terms.
16+
The Code of Conduct can be found at https://github.com/rollerworks/contributing/blob/master/CODE_OF_CONDUCT.md.
17+
-->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: ⛔ Security Issue
3+
about: Report security issues and problems (PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY)
4+
5+
---
6+
7+
⚠ PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, SEE BELOW.
8+
9+
If you have found a security issue in this library, please send the details
10+
to security [at] rollerscapes.net and don't disclose it publicly until
11+
we can provide a fix for it.
12+
13+
**Note:** Please don't blindly send reports about automated tools, make sure the
14+
reported issue is in fact exploitable. Thanks.

.github/composer-config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"config": {
3+
"cache-vcs-dir": "/dev/null",
4+
"platform-check": false,
5+
"preferred-install": {
6+
"*": "dist"
7+
},
8+
"allow-plugins": {
9+
"ergebnis/composer-normalize": true,
10+
"symfony/flex": true
11+
}
12+
}
13+
}

.github/workflows/ci.yaml

Lines changed: 0 additions & 120 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Composer Validate
2+
3+
on:
4+
push:
5+
paths:
6+
- 'composer.json'
7+
pull_request:
8+
paths:
9+
- 'composer.json'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
composer-sync:
20+
name: 'Composer validation'
21+
runs-on: ubuntu-24.04
22+
env:
23+
php-version: '8.4'
24+
25+
steps:
26+
-
27+
name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ env.php-version }}
31+
ini-values: "memory_limit=-1"
32+
coverage: none
33+
34+
-
35+
name: Checkout target branch
36+
uses: actions/checkout@v6
37+
38+
-
39+
name: 'Install dependencies'
40+
run: |
41+
COMPOSER_HOME="$(composer config home)"
42+
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
43+
composer global require -q "ergebnis/composer-normalize"
44+
composer install --no-progress
45+
46+
-
47+
name: 'Normalized composer.json'
48+
run: |
49+
echo "composer.json"
50+
composer validate
51+
composer normalize
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CS
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
call-inspector-bot:
11+
name: InspectorBot
12+
uses: rollerscapes/inspector-bot/.github/workflows/inspector-bot.yml@main
13+
with:
14+
package: RollerworksPasswordStrengthValidator
15+
check_license: true
16+

.github/workflows/phpstan.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: PHPStan
2+
3+
on:
4+
pull_request:
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
phpstan:
19+
name: PHPStan
20+
runs-on: ubuntu-24.04
21+
22+
env:
23+
php-version: '8.2'
24+
steps:
25+
-
26+
name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ env.php-version }}
30+
ini-values: "memory_limit=-1"
31+
coverage: none
32+
33+
-
34+
name: Checkout target branch
35+
uses: actions/checkout@v6
36+
with:
37+
ref: ${{ github.base_ref }}
38+
39+
-
40+
name: Checkout PR
41+
uses: actions/checkout@v6
42+
43+
-
44+
name: Install dependencies
45+
run: |
46+
COMPOSER_HOME="$(composer config home)"
47+
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
48+
composer install --no-progress --ansi --no-plugins
49+
50+
-
51+
name: Generate PHPStan baseline
52+
run: |
53+
git checkout composer.json
54+
git checkout -m ${{ github.base_ref }}
55+
vendor/bin/phpstan analyze --generate-baseline --allow-empty-baseline --no-progress
56+
git checkout -m FETCH_HEAD
57+
58+
-
59+
name: PHPStan
60+
run: |
61+
vendor/bin/phpstan analyze --no-progress --error-format=github
62+

0 commit comments

Comments
 (0)