File tree Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Build PHAR
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ permissions :
10
+ contents : read
11
+
12
+ jobs :
13
+ build-phar :
14
+ name : " Build PHAR"
15
+
16
+ runs-on : ${{ matrix.operating-system }}
17
+
18
+ strategy :
19
+ fail-fast : false
20
+ matrix :
21
+ dependencies :
22
+ - " locked"
23
+ php-version :
24
+ - " 8.1"
25
+ operating-system :
26
+ - " ubuntu-latest"
27
+
28
+ steps :
29
+ - name : " Checkout"
30
+ uses : " actions/checkout@v4"
31
+
32
+ - name : " Install PHP"
33
+ uses : " shivammathur/setup-php@v2"
34
+ with :
35
+ coverage : none
36
+ tools : composer:v2
37
+ php-version : " ${{ matrix.php-version }}"
38
+ ini-values : memory_limit=-1
39
+
40
+ - name : " Get Composer Cache Directory"
41
+ id : composer-cache
42
+ run : |
43
+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
44
+
45
+ - name : " Cache Composer dependencies"
46
+ uses : " actions/cache@v3"
47
+ with :
48
+ path : " ${{ steps.composer-cache.outputs.dir }}"
49
+ key : " php-${{ matrix.php-version }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
50
+ restore-keys : |
51
+ php-${{ matrix.php-version }}-locked-composer-
52
+
53
+ - name : " Install locked dependencies"
54
+ run : " composer install --no-interaction --no-progress"
55
+
56
+ - name : " Build PHAR file"
57
+ run : " composer build:phar"
58
+
59
+ - name : " Test PHAR file"
60
+ run : " ./spc.phar dev:extensions"
61
+
62
+ - uses : actions/upload-artifact@v3
63
+ with :
64
+ name : spc-phar
65
+ path : spc.phar
Original file line number Diff line number Diff line change
1
+ {
2
+ "alias" : " spc-php.phar" ,
3
+ "banner" : false ,
4
+ "blacklist" : [
5
+ " .github" ,
6
+ " tests"
7
+ ],
8
+ "git-commit-short" : " git_commit_short" ,
9
+ "output" : " spc.phar"
10
+ }
Original file line number Diff line number Diff line change 20
20
"captainhook/captainhook" : " ^5.10" ,
21
21
"captainhook/plugin-composer" : " ^5.3" ,
22
22
"friendsofphp/php-cs-fixer" : " ^3.25" ,
23
+ "humbug/box" : " ^4.3" ,
23
24
"nunomaduro/collision" : " ^7.8" ,
24
25
"phpstan/phpstan" : " ^1.10" ,
25
26
"phpunit/phpunit" : " ^10.3"
44
45
"scripts" : {
45
46
"analyse" : " phpstan analyse --memory-limit 300M" ,
46
47
"cs-fix" : " php-cs-fixer fix" ,
47
- "test" : " vendor/bin/phpunit tests/ --no-coverage"
48
+ "test" : " vendor/bin/phpunit tests/ --no-coverage" ,
49
+ "build:phar" : " vendor/bin/box compile"
48
50
},
49
51
"config" : {
50
52
"allow-plugins" : {
You can’t perform that action at this time.
0 commit comments