Skip to content
This repository was archived by the owner on Aug 31, 2024. It is now read-only.

Commit 3d310ec

Browse files
authored
New Features (#34)
* feat: changelog and release * Updates dependencies * tests
1 parent 26255a2 commit 3d310ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+30872
-1716
lines changed

.codesizeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 3rd party libraries
2+
vendor
3+
composer.phar

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/lightszentip/laravel-release-changelog-generator/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/lightszentip/laravel-release-changelog-generator/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a security issue
10+
url: https://github.com/lightszentip/laravel-release-changelog-generator/security/policy
11+
about: Learn how to notify us for sensitive bugs
12+
- name: Report a bug
13+
url: https://github.com/lightszentip/laravel-release-changelog-generator/issues/new
14+
about: Report a reproducible bug

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/.github"
9+
schedule:
10+
interval: "daily"
11+
labels:
12+
- "dependencies"
13+
# Maintain dependencies for Composer
14+
- package-ecosystem: "composer"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
19+
- package-ecosystem: "npm"
20+
directory: "/"
21+
schedule:
22+
interval: "daily"

.github/release-drafter.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name-template: '$RESOLVED_VERSION 🌈'
2+
tag-template: '$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧪 Tests'
14+
labels:
15+
- 'test'
16+
- title: " 📦 Dependencies"
17+
labels:
18+
- "dependencies"
19+
- title: '🧰 Maintenance'
20+
label: 'chore'
21+
- title: '🧺 Miscellaneous' #Everything except ABAP
22+
label: 'misc'
23+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
24+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
25+
version-resolver:
26+
major:
27+
labels:
28+
- 'major'
29+
minor:
30+
labels:
31+
- 'minor'
32+
patch:
33+
labels:
34+
- 'patch'
35+
default: patch
36+
template: |
37+
## Changes
38+
39+
$CHANGES

.github/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- octocat
7+
categories:
8+
- title: Breaking Changes 🛠
9+
labels:
10+
- Semver-Major
11+
- breaking-change
12+
- title: Exciting New Features 🎉
13+
labels:
14+
- Semver-Minor
15+
- enhancement
16+
- title: Other Changes
17+
labels:
18+
- "*"

.github/workflows/codacy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
4141
- name: Run Codacy Analysis CLI
42-
uses: codacy/codacy-analysis-cli-action@0e9ceb296ea1efcd10bd17ce26f263ce895065fc
42+
uses: codacy/codacy-analysis-cli-action@39455b8cb6c5f6812ecd440ad1003fe15fc8f8c0
4343
with:
4444
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
4545
# You can also omit the token and run the tools that support default configurations

.github/workflows/laravel.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/phploc.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
on: [push, pull_request]
3+
name: PHP-LOC and PHPMD
4+
jobs:
5+
6+
phplocmd:
7+
name: phplocmd
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: '8.1'
16+
coverage: none
17+
18+
- name: Install composer dependencies
19+
run: composer install --no-interaction --no-scripts --no-progress --prefer-dist --dev
20+
21+
- name: Run PHPLoc
22+
run: php ./vendor/phploc/phploc/phploc app
23+
24+
#Out of memory
25+
# - name: PHPMD run
26+
# run: php .\vendor\phpmd\phpmd\src\bin\phpmd ./app/ html .\rulesets\codesize.xml --reportfile phpmd.html
27+

.github/workflows/quality-check.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
2+
on: [push, pull_request]
3+
name: PHP-Quality
4+
jobs:
5+
sl-scan:
6+
name: slcan
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
# Instructions
11+
# 1. Setup JDK, Node.js, Python etc depending on your project type
12+
# 2. Compile or build the project before invoking scan
13+
# Example: mvn compile, or npm install or pip install goes here
14+
# 3. Invoke Scan with the github token. Leave the workspace empty to use relative url
15+
16+
- name: Perform Scan
17+
uses: ShiftLeftSecurity/scan-action@4d4c04908eff87430482f36340ad5706c14cf9a6
18+
env:
19+
WORKSPACE: ""
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
SCAN_AUTO_BUILD: true
22+
with:
23+
output: reports
24+
# Scan auto-detects the languages in your project. To override uncomment the below variable and set the type
25+
# type: credscan,java
26+
# type: python
27+
28+
- name: Upload report
29+
uses: github/codeql-action/upload-sarif@v2
30+
with:
31+
sarif_file: reports
32+
33+
phpstan:
34+
name: phpstan-psalm
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v3
38+
39+
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: '8.1'
43+
coverage: none
44+
45+
- name: Install dependencies
46+
run: |
47+
composer install --no-interaction --no-scripts --no-progress --prefer-dist --dev
48+
49+
- name: Run PHPStan
50+
run: ./vendor/bin/phpstan --error-format=github
51+
52+
- name: PSALM
53+
run: ./vendor/bin/psalm
54+
55+
- name: phpstan
56+
run: ./vendor/bin/phpstan analyse app tests -l 1 #set level for more checks php -d memory_limit=2G vendor/bin/phpstan analyse app tests -l 1
57+
58+
- name: Run security checks 👮
59+
uses: symfonycorp/security-checker-action@v5
60+
61+
php-cs-fixer:
62+
name: PHP-CS-Fixer
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v3
66+
67+
- name: Setup PHP
68+
uses: shivammathur/setup-php@v2
69+
with:
70+
php-version: '8.0'
71+
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
72+
73+
- name: Install Dependencies
74+
run: composer install --no-interaction --no-scripts --no-progress --prefer-dist
75+
76+
- name: Fix Style
77+
run: ./vendor/bin/php-cs-fixer fix --diff --allow-risky=no app
78+
79+
# - name: Commit Changes
80+
# uses: stefanzweifel/git-auto-commit-action@v4
81+
# with:
82+
# commit_message: Fix styling changes
83+
84+
test:
85+
runs-on: ${{ matrix.os }}
86+
strategy:
87+
fail-fast: true
88+
matrix:
89+
os: [ ubuntu-latest ]
90+
php: [ 8.2, 8.1, 8.0 ]
91+
laravel: [ 9.* ]
92+
stability: [ prefer-lowest, prefer-stable ]
93+
include:
94+
- laravel: 9.*
95+
testbench: 7.*
96+
97+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
98+
99+
steps:
100+
- name: Checkout code
101+
uses: actions/checkout@v3
102+
103+
- name: Setup PHP
104+
uses: shivammathur/setup-php@v2
105+
with:
106+
php-version: ${{ matrix.php }}
107+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
108+
coverage: none
109+
110+
- name: Setup problem matchers
111+
run: |
112+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
113+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
114+
115+
- name: Install dependencies
116+
run: |
117+
composer install --no-interaction --no-scripts --no-progress --prefer-dist --dev
118+
119+
- name: Remove dependencies
120+
run: composer remove mrdebug/crudgen --no-interaction --no-scripts --dev
121+
122+
- name: Install dependencies
123+
run: |
124+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
125+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
126+
127+
- name: List Installed Dependencies
128+
run: composer show -D
129+
130+
- name: Copy .env
131+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
132+
- name: Generate key
133+
run: php artisan key:generate
134+
135+
- name: Execute tests
136+
env:
137+
SESSION_DRIVER: array
138+
DB_CONNECTION: sqlite
139+
DB_DATABASE: ":memory:"
140+
run: ./vendor/bin/pest
141+
142+
- name: Execute tests (Unit and Feature tests) via PHPUnit
143+
env:
144+
SESSION_DRIVER: array
145+
DB_CONNECTION: sqlite
146+
DB_DATABASE: ":memory:"
147+
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)