1
1
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2
+ # https://github.com/localheinz/php-library-template/blob/master/.github/workflows/continuous-integration.yml
3
+ # https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
2
4
3
5
on :
4
6
pull_request :
8
10
tags :
9
11
- " **"
10
12
11
- name : " PHPUnit tests "
13
+ name : " Continuous Integration "
12
14
13
15
jobs :
14
16
15
17
tests :
16
- name : " Tests"
17
-
18
+ name : " Unit Tests"
18
19
runs-on : ubuntu-latest
19
20
20
21
strategy :
@@ -24,17 +25,26 @@ jobs:
24
25
- php7.3
25
26
# - php7.4
26
27
28
+ dependencies :
29
+ - lowest
30
+ # - locked
31
+ - highest
32
+
27
33
steps :
28
34
- name : " Checkout"
29
35
30
36
31
- - name : " Install dependencies with composer"
32
- run : ${{ matrix.php-binary }} $(which composer) update --no-interaction --prefer-source --no-progress --no-suggest
37
+ - name : " Install lowest dependencies with composer"
38
+ if : matrix.dependencies == 'lowest'
39
+ run : ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --prefer-lowest
40
+
41
+ # - name: "Install locked dependencies with composer"
42
+ # if: matrix.dependencies == 'locked'
43
+ # run: ${{ matrix.php-binary }} $(which composer) install --no-interaction --no-progress --no-suggest
33
44
34
- - name : " Run unit tests with phpunit/phpunit"
35
- run : ${{ matrix.php-binary }} vendor/bin/phpunit --configuration phpunit.xml --coverage-clover clover.xml
45
+ - name : " Install highest dependencies with composer"
46
+ if : matrix.dependencies == 'highest'
47
+ run : ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest
36
48
37
- # - name: "Send code coverage report to Codecov.io"
38
- # env:
39
- # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
40
- # run: bash <(curl -s https://codecov.io/bash)
49
+ - name : " Run unit tests with phpunit"
50
+ run : ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=phpunit.xml
0 commit comments