Skip to content

Commit

Permalink
ECS & PHPstan
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Mar 26, 2024
1 parent 3366d47 commit c7c83be
Show file tree
Hide file tree
Showing 11 changed files with 6,941 additions and 16 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Do not export those files in the Composer archive (lighter dependency)
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/ecs.php export-ignore
/phpstan.neon export-ignore
/lib/ export-ignore
/docs/ export-ignore
/tests/ export-ignore

# Auto detect text files and perform LF normalization
* text=auto
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci
on:
workflow_dispatch:
push:
branches:
- develop
- develop-v5
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: ci
uses: studioespresso/.github/.github/workflows/ci.yml@main
with:
craft_version: '5'
jobs: '["ecs", "phpstan"]'
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Creates a new GitHub Release whenever the Craft Plugin Store
# is notified of a new version tag.

name: Create Release
run-name: Create release for ${{ github.event.client_payload.version }}

on:
repository_dispatch:
types:
- craftcms/new-release

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: ncipollo/release-action@v1
with:
body: ${{ github.event.client_payload.notes }}
makeLatest: ${{ github.event.client_payload.latest }}
name: ${{ github.event.client_payload.version }}
prerelease: ${{ github.event.client_payload.prerelease }}
tag: ${{ github.event.client_payload.tag }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
vendor
.DS_Store
18 changes: 17 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@
}
],
"require": {
"craftcms/cms": "^5.0.0-5.0.0-beta.1"
"craftcms/cms": "^5.0.0-beta.1"
},
"require-dev": {
"craftcms/ecs": "dev-main",
"craftcms/phpstan": "dev-main"
},
"scripts": {
"check-cs": "ecs check --ansi",
"fix-cs": "ecs check --ansi --fix",
"phpstan": "phpstan --memory-limit=1G",
"ci": "ecs check --ansi --fix && phpstan --memory-limit=1G"
},
"autoload": {
"psr-4": {
Expand All @@ -36,5 +46,11 @@
"hasCpSection": false,
"changelogUrl": "https://raw.githubusercontent.com/statikbe/craft-config-values/master/CHANGELOG.md",
"class": "statikbe\\configvaluesfield\\ConfigValuesField"
},
"config": {
"allow-plugins": {
"yiisoft/yii2-composer": true,
"craftcms/plugin-installer": true
}
}
}
Loading

0 comments on commit c7c83be

Please sign in to comment.