Skip to content

Commit 9b9588d

Browse files
committed
:octocat:
1 parent a38e677 commit 9b9588d

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

.github/workflows/tests.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# 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
24

35
on:
46
pull_request:
@@ -8,13 +10,12 @@ on:
810
tags:
911
- "**"
1012

11-
name: "PHPUnit tests"
13+
name: "Continuous Integration"
1214

1315
jobs:
1416

1517
tests:
16-
name: "Tests"
17-
18+
name: "Unit Tests"
1819
runs-on: ubuntu-latest
1920

2021
strategy:
@@ -24,17 +25,26 @@ jobs:
2425
- php7.3
2526
# - php7.4
2627

28+
dependencies:
29+
- lowest
30+
# - locked
31+
- highest
32+
2733
steps:
2834
- name: "Checkout"
2935
uses: actions/[email protected]
3036

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
3344

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
3648

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

Comments
 (0)