1- on :
2- push :
3- branches :
4- - master
5- pull_request :
6- name : Qa workflow
7- env :
8- extensions : mbstring, intl, iconv, libxml, dom, json, simplexml, zlib, fileinfo
9- key : cache-v1 # can be any string, change to clear the extension cache.
10- defaultPHPVersion : ' 7.3'
11- jobs :
12- phpunit-with-coverage :
13- runs-on : ubuntu-latest
14- name : Unit tests
15- steps :
16- - uses : actions/checkout@v2
17-
18- - name : Install graphviz
19- run : sudo apt-get update && sudo apt-get install -y graphviz
20-
21- - name : Setup PHP
22- uses : shivammathur/setup-php@v2
23- with :
24- php-version : ${{ env.defaultPHPVersion }}
25- ini-values : memory_limit=2G, display_errors=On, error_reporting=-1
26- tools : phive
27-
28- - name : Get composer cache directory
29- id : composer-cache
30- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
31-
32- - name : Cache composer dependencies
33- uses : actions/cache@v2
34- with :
35- path : ${{ steps.composer-cache.outputs.dir }}
36- key : composer-${{ hashFiles('**/composer.lock') }}
37- restore-keys : composer-
38-
39- - name : Install Composer dependencies
40- run : |
41- composer install --no-progress --prefer-dist --optimize-autoloader
42-
43- - name : Run PHPUnit
44- run : php vendor/bin/phpunit
45-
46- phpunit :
47- runs-on : ${{ matrix.operating-system }}
48- strategy :
49- matrix :
50- operating-system :
51- - ubuntu-latest
52- php-versions : ['7.2', '7.3', '7.4', '8.0', '8.1']
53- name : Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
54- needs :
55- - phpunit-with-coverage
56- steps :
57- - uses : actions/checkout@v2
58-
59- - name : Install graphviz
60- run : sudo apt-get update && sudo apt-get install -y graphviz
61-
62- - name : Setup PHP
63- uses : shivammathur/setup-php@v2
64- with :
65- php-version : ${{ matrix.php-versions }}
66- extension-csv : mbstring, simplexml
67- ini-values : memory_limit=2G, display_errors=On, error_reporting=-1
68-
69- - name : Get composer cache directory
70- id : composer-cache
71- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
72-
73- - name : Cache composer dependencies
74- uses : actions/cache@v2
75- with :
76- path : ${{ steps.composer-cache.outputs.dir }}
77- key : composer-${{ hashFiles('**/composer.lock') }}
78- restore-keys : composer-
1+ # https://docs.github.com/en/actions
792
80- - name : Install Composer dependencies
81- run : |
82- composer install --no-progress --prefer-dist --optimize-autoloader
3+ name : " Integrate"
834
84- - name : Run PHPUnit
85- run : php vendor/bin/phpunit
86-
87- codestyle :
88- runs-on : ubuntu-latest
89- steps :
90- - uses : actions/checkout@v2
91- - name : Restore/cache vendor folder
92- uses : actions/cache@v1
93- with :
94- path : vendor
95- key : all-build-${{ hashFiles('**/composer.lock') }}
96- restore-keys : |
97- all-build-${{ hashFiles('**/composer.lock') }}
98- all-build-
99- - name : Restore/cache tools folder
100- uses : actions/cache@v1
101- with :
102- path : tools
103- key : all-tools-${{ github.sha }}
104- restore-keys : |
105- all-tools-${{ github.sha }}-
106- all-tools-
107- - name : Code style check
108- uses : docker://phpdoc/phpcs-ga:latest
109- env :
110- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111- with :
112- args : -d memory_limit=1024M
113-
114- phpstan :
115- runs-on : ubuntu-latest
116- steps :
117- - uses : actions/checkout@v2
118- - name : Setup PHP
119- uses : shivammathur/setup-php@v2
120- with :
121- php-version : ${{ env.defaultPHPVersion }}
122- ini-values : memory_limit=2G, display_errors=On, error_reporting=-1
123- tools : pecl
124-
125- - name : Get composer cache directory
126- id : composer-cache
127- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
128-
129- - name : Cache composer dependencies
130- uses : actions/cache@v2
131- with :
132- path : ${{ steps.composer-cache.outputs.dir }}
133- key : composer-${{ hashFiles('**/composer.lock') }}
134- restore-keys : composer-
135-
136- - name : Install Composer dependencies
137- run : |
138- composer install --no-progress --prefer-dist --optimize-autoloader
139-
140- - name : PHPStan
141- uses : phpDocumentor/phpstan-ga@master
142- env :
143- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
144- with :
145- args : analyse src tests --configuration phpstan.neon
146-
147- psalm :
148- runs-on : ubuntu-latest
149- steps :
150- - uses : actions/checkout@v2
151-
152- - name : Setup PHP
153- uses : shivammathur/setup-php@v2
154- with :
155- php-version : 7.3
156- ini-values : memory_limit=2G, display_errors=On, error_reporting=-1
157- tools : pecl, psalm
158-
159- - name : Get composer cache directory
160- id : composer-cache
161- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
162-
163- - name : Cache composer dependencies
164- uses : actions/cache@v2
165- with :
166- path : ${{ steps.composer-cache.outputs.dir }}
167- key : composer-${{ hashFiles('**/composer.lock') }}
168- restore-keys : composer-
169-
170- - name : Install Composer dependencies
171- run : |
172- composer install --no-progress --prefer-dist --optimize-autoloader
5+ on : # yamllint disable-line rule:truthy
6+ push :
7+ branches :
8+ - " master"
9+ pull_request : null
10+ schedule :
11+ - cron : " 0 14 * * 1"
12+ # Allow manually triggering the workflow.
13+ workflow_dispatch : true
17314
174- - name : Psalm
175- run : vendor/bin/psalm.phar --output-format=github
15+ jobs :
16+ code-coverage :
17+ name : " Code Coverage"
18+ uses : " phpDocumentor/.github/.github/workflows/code-coverage.yml@main"
19+ with :
20+ composer-root-version : " 1.x-dev"
21+
22+ coding-standards :
23+ name : " Coding Standards"
24+ uses :
" phpDocumentor/.github/.github/workflows/[email protected] " 25+ with :
26+ composer-root-version : " 1.x-dev"
27+
28+ dependency-analysis :
29+ name : " Dependency analysis"
30+ uses :
" phpDocumentor/.github/.github/workflows/[email protected] " 31+ with :
32+ composer-root-version : " 1.x-dev"
33+
34+ lint-root :
35+ name : " Lint root"
36+ uses : " phpDocumentor/.github/.github/workflows/lint.yml@main"
37+ with :
38+ composer-options : " --no-check-publish --ansi"
39+
40+ static-analysis :
41+ name : " Static analysis"
42+ uses :
" phpDocumentor/.github/.github/workflows/[email protected] " 43+ with :
44+ php-extensions : " none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo, pcntl, posix"
45+ composer-root-version : " 1.x-dev"
46+
47+ unit-tests :
48+ name : " Unit test"
49+ uses :
" phpDocumentor/.github/.github/workflows/[email protected] " 50+ with :
51+ composer-root-version : " 1.x-dev"
52+ upcoming-releases : true
0 commit comments