Skip to content

Commit 9f27f35

Browse files
authored
Merge pull request #42 from phpDocumentor/github-actions
Setup github actions
2 parents 0b827a5 + 962dbd8 commit 9f27f35

File tree

8 files changed

+198
-156
lines changed

8 files changed

+198
-156
lines changed

.github/main.workflow

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

.github/workflows/push.yml

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
on: push
2+
name: Qa workflow
3+
jobs:
4+
setup:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@master
8+
- name: Restore/cache vendor folder
9+
uses: actions/cache@v1
10+
with:
11+
path: vendor
12+
key: all-build-${{ hashFiles('**/composer.lock') }}
13+
restore-keys: |
14+
all-build-${{ hashFiles('**/composer.lock') }}
15+
all-build-
16+
- name: Restore/cache tools folder
17+
uses: actions/cache@v1
18+
with:
19+
path: tools
20+
key: all-tools-${{ github.sha }}
21+
restore-keys: |
22+
all-tools-${{ github.sha }}-
23+
all-tools-
24+
- name: composer
25+
uses: docker://composer
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
args: install --no-interaction --prefer-dist --optimize-autoloader
30+
- name: Install phive
31+
run: make install-phive
32+
- name: Install PHAR dependencies
33+
run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,D2CCAC42F6295E7D,E82B2FB314E9906E,8E730BA25823D8B5 --force-accept-unsigned
34+
35+
phpunit-with-coverage:
36+
runs-on: ubuntu-latest
37+
name: Unit tests
38+
needs: setup
39+
steps:
40+
- uses: actions/checkout@master
41+
- name: Restore/cache vendor folder
42+
uses: actions/cache@v1
43+
with:
44+
path: vendor
45+
key: all-build-${{ hashFiles('**/composer.lock') }}
46+
restore-keys: |
47+
all-build-${{ hashFiles('**/composer.lock') }}
48+
all-build-
49+
- name: Restore/cache tools folder
50+
uses: actions/cache@v1
51+
with:
52+
path: tools
53+
key: all-tools-${{ github.sha }}
54+
restore-keys: |
55+
all-tools-${{ github.sha }}-
56+
all-tools-
57+
- name: Install graphviz
58+
run: sudo apt-get update && sudo apt-get install -y graphviz
59+
- name: Setup PHP
60+
uses: shivammathur/setup-php@master
61+
with:
62+
php-version: 7.2
63+
extension-csv: mbstring, simplexml
64+
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
65+
coverage: xdebug
66+
pecl: false
67+
- name: Run PHPUnit
68+
run: php vendor/bin/phpunit
69+
- name: Upload to Scrutinizer
70+
run: tools/ocular code-coverage:upload --format=php-clover build/logs/clover.xml
71+
72+
phpunit:
73+
runs-on: ${{ matrix.operating-system }}
74+
strategy:
75+
matrix:
76+
operating-system:
77+
- ubuntu-latest
78+
php-versions: ['7.2', '7.3', '7.4']
79+
name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
80+
needs:
81+
- setup
82+
- phpunit-with-coverage
83+
steps:
84+
- uses: actions/checkout@master
85+
- name: Restore/cache vendor folder
86+
uses: actions/cache@v1
87+
with:
88+
path: vendor
89+
key: all-build-${{ hashFiles('**/composer.lock') }}
90+
restore-keys: |
91+
all-build-${{ hashFiles('**/composer.lock') }}
92+
all-build-
93+
- name: Restore/cache tools folder
94+
uses: actions/cache@v1
95+
with:
96+
path: tools
97+
key: all-tools-${{ github.sha }}
98+
restore-keys: |
99+
all-tools-${{ github.sha }}-
100+
all-tools-
101+
- name: Setup PHP
102+
uses: shivammathur/setup-php@master
103+
with:
104+
php-version: ${{ matrix.php-versions }}
105+
extension-csv: mbstring, simplexml
106+
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
107+
pecl: false
108+
- name: Run PHPUnit
109+
continue-on-error: true
110+
run: php tools/phpunit
111+
112+
codestyle:
113+
runs-on: ubuntu-latest
114+
needs: [setup, phpunit]
115+
steps:
116+
- uses: actions/checkout@master
117+
- name: Restore/cache vendor folder
118+
uses: actions/cache@v1
119+
with:
120+
path: vendor
121+
key: all-build-${{ hashFiles('**/composer.lock') }}
122+
restore-keys: |
123+
all-build-${{ hashFiles('**/composer.lock') }}
124+
all-build-
125+
- name: Restore/cache tools folder
126+
uses: actions/cache@v1
127+
with:
128+
path: tools
129+
key: all-tools-${{ github.sha }}
130+
restore-keys: |
131+
all-tools-${{ github.sha }}-
132+
all-tools-
133+
- name: Code style check
134+
uses: docker://phpdoc/phpcs-ga:latest
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137+
with:
138+
args: -d memory_limit=1024M
139+
140+
phpstan:
141+
runs-on: ubuntu-latest
142+
needs: [setup, phpunit]
143+
steps:
144+
- uses: actions/checkout@master
145+
- name: Restore/cache vendor folder
146+
uses: actions/cache@v1
147+
with:
148+
path: vendor
149+
key: all-build-${{ hashFiles('**/composer.lock') }}
150+
restore-keys: |
151+
all-build-${{ hashFiles('**/composer.lock') }}
152+
all-build-
153+
- name: Restore/cache tools folder
154+
uses: actions/cache@v1
155+
with:
156+
path: tools
157+
key: all-tools-${{ github.sha }}
158+
restore-keys: |
159+
all-tools-${{ github.sha }}-
160+
all-tools-
161+
- name: PHPStan
162+
uses: docker://phpdoc/phpstan-ga:0.12
163+
env:
164+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165+
with:
166+
args: analyse src tests --level max --configuration phpstan.neon
167+
168+
psalm:
169+
runs-on: ubuntu-latest
170+
needs: [setup, phpunit]
171+
steps:
172+
- uses: actions/checkout@master
173+
- name: Restore/cache vendor folder
174+
uses: actions/cache@v1
175+
with:
176+
path: vendor
177+
key: all-build-${{ hashFiles('**/composer.lock') }}
178+
restore-keys: |
179+
all-build-${{ hashFiles('**/composer.lock') }}
180+
all-build-
181+
- name: Restore/cache tools folder
182+
uses: actions/cache@v1
183+
with:
184+
path: tools
185+
key: all-tools-${{ github.sha }}
186+
restore-keys: |
187+
all-tools-${{ github.sha }}-
188+
all-tools-
189+
- name: Psalm
190+
uses: docker://mickaelandrieu/psalm-ga
191+
env:
192+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ phpcs:
1717

1818
.PHONY: phpstan
1919
phpstan:
20-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpstan-ga:latest analyse src tests --no-progress --level max --configuration phpstan.neon
20+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpstan-ga:0.12 analyse src tests --no-progress --level max --configuration phpstan.neon
2121

2222
.PHONY: psaml
2323
psalm:

appveyor.yml

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

composer-require-config.json

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

phive.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="php-coveralls/php-coveralls" version="^2.2.0" installed="2.2.0" location="./tools/php-coveralls" copy="true"/>
4+
<phar name="scrutinizer-ci/ocular" version="^1.6.0" installed="1.6.0" location="./tools/ocular" copy="true" force-accept-unsigned="true"/>
5+
</phive>

src/phpDocumentor/PHPStan/AttributeSetterMethodReflection.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@
2020
use PHPStan\Reflection\MethodReflection;
2121
use PHPStan\Reflection\ParametersAcceptor;
2222
use PHPStan\Reflection\Php\DummyParameter;
23-
use PHPStan\Reflection\Php\PhpParameterReflection;
2423
use PHPStan\TrinaryLogic;
25-
use PHPStan\Type\Generic\TemplateTypeHelper;
2624
use PHPStan\Type\Generic\TemplateTypeMap;
2725
use PHPStan\Type\ObjectType;
28-
use PHPStan\Type\StringType;
2926
use PHPStan\Type\Type;
3027

3128
final class AttributeSetterMethodReflection implements MethodReflection

0 commit comments

Comments
 (0)