Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c51c4b

Browse files
committed
Reuse upstream workflows and setup Psalm
1 parent 41260af commit 3c51c4b

6 files changed

Lines changed: 27 additions & 164 deletions

File tree

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,4 @@ on:
1212
jobs:
1313
coding-standards:
1414
name: "Coding Standards"
15-
runs-on: "ubuntu-20.04"
16-
17-
strategy:
18-
matrix:
19-
php-version:
20-
- "7.4"
21-
22-
steps:
23-
- name: "Checkout"
24-
uses: "actions/checkout@v2"
25-
26-
- name: "Install PHP"
27-
uses: "shivammathur/setup-php@v2"
28-
with:
29-
coverage: "none"
30-
php-version: "${{ matrix.php-version }}"
31-
tools: "cs2pr"
32-
33-
- name: "Install dependencies with Composer"
34-
uses: "ramsey/composer-install@v1"
35-
with:
36-
dependency-versions: "highest"
37-
38-
39-
# https://github.com/doctrine/.github/issues/3
40-
- name: "Run PHP_CodeSniffer"
41-
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
15+
uses: "doctrine/.github/.github/workflows/[email protected]"

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -17,67 +17,4 @@ jobs:
1717

1818
phpunit:
1919
name: "PHPUnit"
20-
runs-on: "ubuntu-20.04"
21-
22-
strategy:
23-
matrix:
24-
php-version:
25-
- "7.2"
26-
- "7.3"
27-
- "7.4"
28-
- "8.0"
29-
dependencies:
30-
- "highest"
31-
include:
32-
- dependencies: "lowest"
33-
php-version: "7.2"
34-
35-
steps:
36-
- name: "Checkout"
37-
uses: "actions/checkout@v2"
38-
with:
39-
fetch-depth: 2
40-
41-
- name: "Install PHP"
42-
uses: "shivammathur/setup-php@v2"
43-
with:
44-
php-version: "${{ matrix.php-version }}"
45-
coverage: "pcov"
46-
ini-values: "zend.assertions=1"
47-
48-
- name: "Install dependencies with Composer"
49-
uses: "ramsey/composer-install@v1"
50-
with:
51-
dependency-versions: "${{ matrix.dependencies }}"
52-
composer-options: "--prefer-dist"
53-
54-
- name: "Run PHPUnit"
55-
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
56-
57-
- name: "Upload coverage file"
58-
uses: "actions/upload-artifact@v2"
59-
with:
60-
name: "phpunit-${{ matrix.dependencies }}-${{ matrix.php-version }}.coverage"
61-
path: "coverage.xml"
62-
63-
upload_coverage:
64-
name: "Upload coverage to Codecov"
65-
runs-on: "ubuntu-20.04"
66-
needs:
67-
- "phpunit"
68-
69-
steps:
70-
- name: "Checkout"
71-
uses: "actions/checkout@v2"
72-
with:
73-
fetch-depth: 2
74-
75-
- name: "Download coverage files"
76-
uses: "actions/download-artifact@v2"
77-
with:
78-
path: "reports"
79-
80-
- name: "Upload to Codecov"
81-
uses: "codecov/codecov-action@v1"
82-
with:
83-
directory: reports
20+
uses: "doctrine/.github/.github/workflows/[email protected]"

.github/workflows/release-on-milestone-closed.yml

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,10 @@ on:
88
jobs:
99
release:
1010
name: "Git tag, release & create merge-up PR"
11-
runs-on: "ubuntu-20.04"
12-
13-
steps:
14-
- name: "Checkout"
15-
uses: "actions/checkout@v2"
16-
17-
- name: "Release"
18-
uses: "laminas/automatic-releases@v1"
19-
with:
20-
command-name: "laminas:automatic-releases:release"
21-
env:
22-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
23-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
24-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
25-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
26-
27-
- name: "Create Merge-Up Pull Request"
28-
uses: "laminas/automatic-releases@v1"
29-
with:
30-
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
31-
env:
32-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
33-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
34-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
35-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
36-
37-
# Uncomment this step if the repository uses a "next minor as default
38-
# branch" policy.
39-
#
40-
# - name: "Create and/or Switch to new Release Branch"
41-
# uses: "laminas/automatic-releases@v1"
42-
# with:
43-
# command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
44-
# env:
45-
# "GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
46-
# "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
47-
# "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
48-
# "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
49-
50-
- name: "Create new milestones"
51-
uses: "laminas/automatic-releases@v1"
52-
with:
53-
command-name: "laminas:automatic-releases:create-milestones"
54-
env:
55-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
56-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
57-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
58-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
11+
uses: "doctrine/.github/.github/workflows/[email protected]"
12+
secrets:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
15+
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
16+
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
17+
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,4 @@ on:
1212
jobs:
1313
static-analysis-phpstan:
1414
name: "Static Analysis with PHPStan"
15-
runs-on: "ubuntu-20.04"
16-
17-
strategy:
18-
matrix:
19-
php-version:
20-
- "7.4"
21-
22-
steps:
23-
- name: "Checkout code"
24-
uses: "actions/checkout@v2"
25-
26-
- name: "Install PHP"
27-
uses: "shivammathur/setup-php@v2"
28-
with:
29-
coverage: "none"
30-
php-version: "${{ matrix.php-version }}"
31-
32-
- name: "Install dependencies with Composer"
33-
uses: "ramsey/composer-install@v1"
34-
with:
35-
dependency-versions: "highest"
36-
37-
- name: "Run a static analysis with phpstan/phpstan"
38-
run: "vendor/bin/phpstan analyse"
15+
uses: "doctrine/.github/.github/workflows/[email protected]"

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"phpstan/phpstan": "^0.12",
2121
"phpstan/phpstan-phpunit": "^0.12",
2222
"phpstan/phpstan-strict-rules": "^0.12",
23-
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
23+
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
24+
"vimeo/psalm": "^4.10"
2425
},
2526
"autoload": {
2627
"psr-4": {

psalm.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="7"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
>
9+
<projectFiles>
10+
<directory name="lib/Doctrine/Inflector" />
11+
<ignoreFiles>
12+
<directory name="vendor" />
13+
</ignoreFiles>
14+
</projectFiles>
15+
</psalm>

0 commit comments

Comments
 (0)