-
Notifications
You must be signed in to change notification settings - Fork 4
108 lines (98 loc) · 3 KB
/
php.yml
File metadata and controls
108 lines (98 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: PHP checks
on:
pull_request:
paths:
- '**/*.php'
- .github/workflows/php.yml
push:
paths:
- '**/*.php'
branches:
- trunk
workflow_dispatch: null
schedule:
- cron: '0 3 * * *'
jobs:
codestyle_php:
if: github.event_name != 'schedule'
name: Codestyle
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/cs-fixer@main
with:
rules: ''
phpstan:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: '${{ github.event.repository.name }}'
shopwareVersion: '${{ matrix.shopware-version }}'
install: true
extraRepositories: |
{
"${{ github.event.repository.name }}": {
"type": "path",
"url": "custom/plugins/${{ github.event.repository.name }}",
"symlink": true
}
}
- name: Create phpstan.neon
working-directory: 'custom/plugins/${{ github.event.repository.name }}'
shell: bash
run: >
printf "parameters:\n tmpDir:
${GITHUB_WORKSPACE}/var/phpstan\nincludes:\n - phpstan.neon.dist" >
phpstan.neon
- name: PHPStan cache
uses: actions/cache@v4
with:
path: '${{ github.workspace }}/var/phpstan'
key: '${{ runner.OS }}-${{ github.repository }}-phpstan-${{ github.sha }}'
restore-keys: |
${{ runner.OS }}-${{ github.repository }}-phpstan-
- name: Build PHPStan Bootstrap
shell: bash
run: >-
php
${GITHUB_WORKSPACE}/src/Core/DevOps/StaticAnalyze/phpstan-bootstrap.php
- name: Run PHPStan
shell: bash
run: >
composer -d custom/plugins/${{ github.event.repository.name }}
dump-autoload --dev
composer -d custom/plugins/${{ github.event.repository.name }} run
phpstan
phpunit:
strategy:
fail-fast: false
matrix:
shopware-version:
- trunk
- 6.6.x
uses: shopware/github-actions/.github/workflows/phpunit.yml@main
with:
extensionName: '${{ github.event.repository.name }}'
shopwareVersion: '${{ matrix.shopware-version }}'
uploadCoverage: true
secrets:
codecovToken: '${{ secrets.CODECOV_TOKEN }}'
smoke_test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: ${{ github.event.repository.name }}
install: true
install-admin: true
install-storefront: true
extraRepositories: |
{
"${{ github.event.repository.name }}": {
"type": "path",
"url": "custom/plugins/${{ github.event.repository.name }}",
"symlink": true
}
}
- name: Uninstall Plugin
run: php bin/console plugin:uninstall ${{ github.event.repository.name }}