File tree Expand file tree Collapse file tree 2 files changed +66
-58
lines changed Expand file tree Collapse file tree 2 files changed +66
-58
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous Integration
2
+
3
+ on :
4
+ push :
5
+ # Avoid running tests on changes to documentation
6
+ paths-ignore :
7
+ - ' docs/**'
8
+ pull_request :
9
+ paths-ignore :
10
+ - ' docs/**'
11
+
12
+ env :
13
+ COMPOSER_ARGS : ' --no-progress'
14
+
15
+ jobs :
16
+ build :
17
+ strategy :
18
+ matrix :
19
+ php_version : ['8.0']
20
+ deps : ['--prefer-lowest --prefer-dist', '']
21
+ include :
22
+ - code-coverage : ' yes'
23
+ php_version : ' 8.0'
24
+ deps : ' '
25
+ runs-on : ubuntu-latest
26
+
27
+ steps :
28
+ - name : Setup PHP
29
+ uses : shivammathur/setup-php@v2
30
+ with :
31
+ php-version : ${{matrix.php_version}}
32
+
33
+ - name : Show PHP version
34
+ run : php -v
35
+
36
+ - uses : actions/checkout@v4
37
+ name : Checkout branch
38
+
39
+ - name : Validate composer.json and composer.lock
40
+ run : composer validate --strict
41
+
42
+ - name : Cache Composer packages
43
+ id : composer-cache
44
+ uses : actions/cache@v4
45
+ with :
46
+ path : vendor
47
+ key : ${{ runner.os }}-php-${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
48
+ restore-keys : |
49
+ ${{ runner.os }}-php--${{matrix.php_version}}-
50
+
51
+ - name : Install/update dependencies
52
+ run : composer update ${{matrix.deps}} $COMPOSER_ARGS
53
+
54
+ - name : Run PHPUnit test suite
55
+ if : ${{ matrix.code-coverage != 'yes' }}
56
+ run : composer run-script test
57
+
58
+ - name : Run PHPUnit test suite with coverage
59
+ if : ${{ matrix.code-coverage == 'yes' }}
60
+ run : composer run-script test-coverage
61
+
62
+ - name : Upload coverage results to Coverall
63
+ if : ${{ matrix.code-coverage == 'yes' }}
64
+ uses : coverallsapp/github-action@v2
65
+
66
+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments