Skip to content

Commit d56bf61

Browse files
authored
Merge pull request #79 from greg0ire/migrate-to-ga
Migrate to ga
2 parents 4307506 + a84305e commit d56bf61

18 files changed

+341
-3260
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
name: "Coding Standards"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
push:
9+
branches:
10+
- "*.x"
11+
12+
env:
13+
COMPOSER_ROOT_VERSION: "1.4"
14+
15+
jobs:
16+
coding-standards:
17+
name: "Coding Standards"
18+
runs-on: "ubuntu-20.04"
19+
20+
strategy:
21+
matrix:
22+
php-version:
23+
- "7.4"
24+
25+
steps:
26+
- name: "Checkout"
27+
uses: "actions/checkout@v2"
28+
29+
- name: "Install PHP"
30+
uses: "shivammathur/setup-php@v2"
31+
with:
32+
coverage: "none"
33+
php-version: "${{ matrix.php-version }}"
34+
tools: "cs2pr"
35+
36+
- name: "Cache dependencies installed with Composer"
37+
uses: "actions/cache@v2"
38+
with:
39+
path: "~/.composer/cache"
40+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
41+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
42+
43+
- name: "Install dependencies with Composer"
44+
run: "composer install --no-interaction --no-progress"
45+
46+
# https://github.com/doctrine/.github/issues/3
47+
- name: "Run PHP_CodeSniffer"
48+
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
name: "Continuous Integration"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
push:
9+
branches:
10+
- "*.x"
11+
12+
env:
13+
fail-fast: true
14+
COMPOSER_ROOT_VERSION: "1.4"
15+
16+
jobs:
17+
phpunit:
18+
name: "PHPUnit with SQLite"
19+
runs-on: "ubuntu-20.04"
20+
21+
strategy:
22+
matrix:
23+
php-version:
24+
- "7.1"
25+
- "7.2"
26+
- "7.3"
27+
- "7.4"
28+
- "8.0"
29+
30+
steps:
31+
- name: "Checkout"
32+
uses: "actions/checkout@v2"
33+
with:
34+
fetch-depth: 2
35+
36+
- name: "Install PHP with XDebug"
37+
uses: "shivammathur/setup-php@v2"
38+
if: "${{ matrix.php-version == '7.1' }}"
39+
with:
40+
php-version: "${{ matrix.php-version }}"
41+
coverage: "xdebug"
42+
ini-values: "zend.assertions=1"
43+
44+
- name: "Install PHP with PCOV"
45+
uses: "shivammathur/setup-php@v2"
46+
if: "${{ matrix.php-version != '7.1' }}"
47+
with:
48+
php-version: "${{ matrix.php-version }}"
49+
coverage: "pcov"
50+
ini-values: "zend.assertions=1"
51+
52+
- name: "Cache dependencies installed with composer"
53+
uses: "actions/cache@v2"
54+
with:
55+
path: "~/.composer/cache"
56+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
57+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
58+
59+
- name: "Install dependencies with composer"
60+
run: "composer update --no-interaction --no-progress"
61+
62+
- name: "Run PHPUnit"
63+
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
64+
65+
- name: "Upload coverage file"
66+
uses: "actions/upload-artifact@v2"
67+
with:
68+
name: "phpunit-${{ matrix.php-version }}.coverage"
69+
path: "coverage.xml"
70+
71+
upload_coverage:
72+
name: "Upload coverage to Codecov"
73+
runs-on: "ubuntu-20.04"
74+
needs:
75+
- "phpunit"
76+
77+
steps:
78+
- name: "Checkout"
79+
uses: "actions/checkout@v2"
80+
with:
81+
fetch-depth: 2
82+
83+
- name: "Download coverage files"
84+
uses: "actions/download-artifact@v2"
85+
with:
86+
path: "reports"
87+
88+
- name: "Upload to Codecov"
89+
uses: "codecov/codecov-action@v1"
90+
with:
91+
directory: reports

.github/workflows/phpbench.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
name: "Performance benchmark"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
push:
9+
branches:
10+
- "*.x"
11+
12+
env:
13+
fail-fast: true
14+
COMPOSER_ROOT_VERSION: "1.4"
15+
16+
jobs:
17+
phpbench:
18+
name: "PHPBench"
19+
runs-on: "ubuntu-20.04"
20+
21+
strategy:
22+
matrix:
23+
php-version:
24+
- "7.4"
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: "actions/checkout@v2"
29+
with:
30+
fetch-depth: 2
31+
32+
- name: "Install PHP"
33+
uses: "shivammathur/setup-php@v2"
34+
with:
35+
php-version: "${{ matrix.php-version }}"
36+
coverage: "pcov"
37+
ini-values: "zend.assertions=1"
38+
39+
- name: "Cache dependencies installed with composer"
40+
uses: "actions/cache@v2"
41+
with:
42+
path: "~/.composer/cache"
43+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
44+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
45+
46+
- name: "Install dependencies with composer"
47+
run: "composer update --no-interaction --no-progress"
48+
49+
- name: "Run PHPBench"
50+
run: "php ./vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Automatic Releases"
2+
3+
on:
4+
milestone:
5+
types:
6+
- "closed"
7+
8+
jobs:
9+
release:
10+
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+
- name: "Create new milestones"
38+
uses: "laminas/automatic-releases@v1"
39+
with:
40+
command-name: "laminas:automatic-releases:create-milestones"
41+
env:
42+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
43+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
44+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
45+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

.github/workflows/static-analysis.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
name: "Static Analysis"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
push:
9+
branches:
10+
- "*.x"
11+
12+
env:
13+
COMPOSER_ROOT_VERSION: "1.4"
14+
15+
jobs:
16+
static-analysis-phpstan:
17+
name: "Static Analysis with PHPStan"
18+
runs-on: "ubuntu-20.04"
19+
20+
strategy:
21+
matrix:
22+
php-version:
23+
- "7.4"
24+
25+
steps:
26+
- name: "Checkout code"
27+
uses: "actions/checkout@v2"
28+
29+
- name: "Install PHP"
30+
uses: "shivammathur/setup-php@v2"
31+
with:
32+
coverage: "none"
33+
php-version: "${{ matrix.php-version }}"
34+
tools: "cs2pr"
35+
36+
- name: "Cache dependencies installed with composer"
37+
uses: "actions/cache@v2"
38+
with:
39+
path: "~/.composer/cache"
40+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
41+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
42+
43+
- name: "Install dependencies with composer"
44+
run: "composer install --no-interaction --no-progress"
45+
46+
- name: "Run a static analysis with phpstan/phpstan"
47+
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
phpunit.xml
2+
/.phpunit.result.cache
23
build
34
vendor
5+
/composer.lock
46
coverage.clover
57
/phpcs.xml
68
/.phpcs-cache

.travis.yml

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

0 commit comments

Comments
 (0)