Skip to content

Commit e123e28

Browse files
committed
adds lowest dep tests
1 parent 40e622a commit e123e28

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,50 @@ jobs:
147147
- name: Integration Tests
148148
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration
149149
if: always()
150+
151+
lowest-version-tests:
152+
name: Test with lowest dependency versions
153+
runs-on: ubuntu-latest
154+
155+
strategy:
156+
fail-fast: false
157+
matrix:
158+
php-versions: ['7.2', '7.3', '7.4']
159+
160+
steps:
161+
- name: Set PHP Version
162+
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }}
163+
164+
- name: Disable Xdebug
165+
run: sudo rm /etc/php/${{ matrix.php-versions }}/cli/conf.d/20-xdebug.ini
166+
167+
- name: Get PHP Version
168+
run: |
169+
ver=$(php -v | grep -oP '(?<=PHP )\d.\d')
170+
echo "::set-output name=version::$ver"
171+
id: php-ver
172+
173+
- name: Using PHP Version from matrix
174+
run: |
175+
echo "Runner is not using PHP Version defined in the php-versions matrix."
176+
php -v
177+
exit 1
178+
if: steps.php-ver.outputs.version != matrix.php-versions
179+
180+
- name: Checkout
181+
uses: actions/[email protected]
182+
183+
- name: Install dependencies
184+
run: composer update --prefer-lowest --prefer-dist --no-progress --no-suggest
185+
186+
- name: Unit Tests
187+
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit
188+
if: always()
189+
190+
- name: Functional Tests
191+
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional
192+
if: always()
193+
194+
- name: Integration Tests
195+
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration
196+
if: always()

0 commit comments

Comments
 (0)