Skip to content

Commit e964fa3

Browse files
committed
ci update
1 parent 1dac850 commit e964fa3

File tree

6 files changed

+508
-1435
lines changed

6 files changed

+508
-1435
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,21 @@ on:
44
push:
55
branches:
66
- main
7-
- '2.0'
87
pull_request:
98
permissions:
109
contents: read
10+
concurrency:
11+
group: ci-${{ github.ref }}
12+
cancel-in-progress: true
1113
jobs:
12-
ecs:
13-
name: ECS
14-
uses: craftcms/.github/.github/workflows/ecs.yml@v1
14+
ci:
15+
name: ci
16+
uses: craftcms/.github/.github/workflows/ci.yml@v3
1517
with:
16-
php_version: '8.0'
17-
phpstan:
18-
name: PHPStan
19-
uses: craftcms/.github/.github/workflows/phpstan.yml@v1
20-
with:
21-
php_version: '8.0'
22-
notify-slack:
23-
name: Notify Slack
24-
needs: [ ecs, phpstan ]
25-
if: ${{ always() }}
26-
uses: craftcms/.github/.github/workflows/notify-slack.yml@v1
27-
with:
28-
success: ${{ needs.ecs.result == 'success' && needs.phpstan.result == 'success' }}
29-
failure_text_prefix: <!subteam^SGFL9NKNZ>
18+
craft_version: '4'
19+
jobs: '["ecs", "phpstan", "prettier"]'
20+
notify_slack: true
21+
slack_subteam: <!subteam^SGFL9NKNZ>
3022
secrets:
3123
token: ${{ secrets.GITHUB_TOKEN }}
3224
slack_webhook_url: ${{ secrets.SLACK_PLUGIN_WEBHOOK_URL }}

.lintstagedrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"**/*.php": [
3+
"./vendor/bin/ecs check --ansi --fix",
4+
"./vendor/bin/phpstan analyse"
5+
],
6+
"*": "prettier --ignore-unknown --write"
7+
}

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.md
2+
*.php
3+
composer.lock
4+
cpresources/*
5+
lib/*
6+
src/templates/*
7+
src/web/assets/**/dist/*
8+
tests/_craft/*
9+
vendor/*
10+
.ddev/*

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"bracketSpacing": false,
4+
"vueIndentScriptAndStyle": true
5+
}

0 commit comments

Comments
 (0)