run-tests #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run-tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
run-tests: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] | |
dependency-version: [prefer-lowest, prefer-stable] | |
experimental: [false] | |
include: | |
- php: 8.3 | |
os: ubuntu-latest | |
dependency-version: prefer-lowest | |
experimental: true | |
- php: 8.3 | |
os: ubuntu-latest | |
dependency-version: prefer-stable | |
experimental: true | |
name: PHP-${{ matrix.php }} - OS-${{ matrix.os }} - ${{ matrix.dependency-version }} - Experimental- ${{ matrix.experimental }} | |
steps: | |
- name: Update apt | |
run: sudo apt-get update --fix-missing | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: curl, json, mbstring | |
coverage: xdebug | |
- name: Install dependencies | |
run: | | |
composer self-update | |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | |
composer dump-autoload | |
composer validate --no-check-all --strict | |
- name: Execute tests | |
run: composer run-script test | |
- name: Upload coverage | |
if: ${{ github.event_name != 'schedule' && matrix.php == '8.2' }} | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: true | |
files: ./coverage.xml |