1
+ # Run the github Continuous Integration
2
+ name : CI
3
+
4
+ # Run this action on:
5
+ on :
6
+
7
+ # When the repo is PUSHed to [main] branch
8
+ pull_request :
9
+ branches : [ main ]
10
+
11
+ # And allow a manual 'run' button in the github action tab
12
+ workflow_dispatch :
13
+
14
+ # When run do this job:
15
+ jobs :
16
+ run :
17
+
18
+ # Use the operating system specified in the strategy 'matrix' below.
19
+ runs-on : ${{ matrix.operating-system }}
20
+
21
+ # Matrix of variables
22
+ strategy :
23
+ matrix :
24
+ operating-system : [ubuntu-latest]
25
+ php-versions : ['8.3']
26
+
27
+ # Give the runner a title (using the matrix variables)
28
+ name : PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
29
+
30
+ # Now do these steps.
31
+ steps :
32
+
33
+ # Use the 'checkout' action (https://github.com/actions/checkout)
34
+ # To pull this repo into the root of your container.
35
+ - name : Checkout
36
+ uses : actions/checkout@v4
37
+
38
+ # Install PHP
39
+ - name : Setup PHP
40
+ # Using this repo
41
+ uses : shivammathur/setup-php@v2
42
+ # And these settings
43
+ with :
44
+ php-version : ${{ matrix.php-versions }} # Change the version to install with the matrix variables above.
45
+ extensions : mbstring, intl # optional, setup extensions
46
+ ini-values : post_max_size=256M, short_open_tag=On # optional, setup php.ini configuration
47
+ coverage : xdebug # optional, setup coverage driver
48
+
49
+ # Check PHP is installed.
50
+ # Weird Note - the next step 'composer install' fails if this PHP Check is not run.
51
+ - name : Check PHP Version
52
+ run : php -v
53
+
54
+ # Install composer to use your autoloader
55
+ - name : Composer install
56
+ run : composer install --optimize-autoloader --prefer-dist
57
+
58
+ # Check listing of directory
59
+ # Also a quick example of multi-commands and the $GITHUB_WORKSPACE variable.
60
+ - name : list dir
61
+ run : |
62
+ ls -la
63
+ ls $GITHUB_WORKSPACE
64
+
65
+ # RUN, You fools.
66
+ # Kick of the phpunit testsuite.
67
+ - name : PHPUnit tests
68
+ run : ./vendor/bin/phpunit
0 commit comments