33name : " Compile PHAR"
44
55on :
6+ pull_request :
67 push :
78 branches :
8- - " 1.5.x "
9+ - " ** "
910 tags :
1011 - ' 1.5.*'
1112
12- concurrency : phar
13+ env :
14+ COMPOSER_ROOT_VERSION : " 1.5.x-dev"
1315
1416jobs :
15- compile :
16- name : " Compile PHAR"
17+ compiler-tests :
18+ name : " Compiler Tests"
19+
1720 runs-on : " ubuntu-latest"
1821 timeout-minutes : 60
1922
3538 - name : " Install compiler dependencies"
3639 run : " composer install --no-interaction --no-progress --working-dir=compiler"
3740
38- - name : " Compile PHAR"
39- run : php compiler/bin/compile
41+ - name : " Compiler tests"
42+ working-directory : " compiler"
43+ run : " vendor/bin/phpunit -c tests/phpunit.xml tests"
44+
45+ - name : " Compiler PHPStan"
46+ working-directory : " compiler"
47+ run : " ../bin/phpstan analyse -l 8 src tests"
48+
49+ - name : " Compiler PHAR"
50+ working-directory : " compiler"
51+ run : " php bin/compile"
4052
53+ - name : " Run PHAR"
54+ run : " ./tmp/phpstan.phar list"
55+
56+ - uses : actions/upload-artifact@v2
57+ with :
58+ name : phar-file
59+ path : tmp/phpstan.phar
60+
61+ integration-tests :
62+ if : github.event_name == 'pull_request'
63+ needs : compiler-tests
64+ uses : phpstan/phpstan/.github/workflows/integration-tests.yml@1.5.x
65+ with :
66+ ref : 1.5.x
67+
68+ extension-tests :
69+ if : github.event_name == 'pull_request'
70+ needs : compiler-tests
71+ uses : phpstan/phpstan/.github/workflows/extension-tests.yml@1.5.x
72+ with :
73+ ref : 1.5.x
74+
75+ other-tests :
76+ if : github.event_name == 'pull_request'
77+ needs : compiler-tests
78+ uses : phpstan/phpstan/.github/workflows/other-tests.yml@1.5.x
79+ with :
80+ ref : 1.5.x
81+
82+ commit :
83+ if : " github.ref == 'refs/heads/1.5.x' || startsWith(github.ref, 'refs/tags/')"
84+ needs : compiler-tests
85+ name : " Commit PHAR"
86+ runs-on : " ubuntu-latest"
87+ timeout-minutes : 60
88+ steps :
4189 - name : " Configure GPG signing key"
4290 run : echo "$GPG_SIGNING_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
4391 env :
@@ -55,6 +103,12 @@ jobs:
55103 token : ${{ secrets.PAT }}
56104 ref : 1.5.x
57105
106+ - name : " Download phpstan.phar"
107+ uses : actions/download-artifact@v3
108+ with :
109+ name : phar-file
110+ path : tmp/phpstan.phar
111+
58112 - name : " cp PHAR"
59113 run : cp tmp/phpstan.phar phpstan-dist/phpstan.phar
60114
0 commit comments