Skip to content

ci: Run integration tests with lowest composer version (2.3) #183

ci: Run integration tests with lowest composer version (2.3)

ci: Run integration tests with lowest composer version (2.3) #183

Workflow file for this run

name: main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
name: PHP CS FIXER
steps:
- uses: actions/checkout@v4
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
integration:
runs-on: ${{ matrix.os }}
needs:
- php-cs-fixer
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
dependencies: [ 'lowest', 'highest' ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
name: Checkout repository
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, zip, rar, bz2
coverage: none
tools: composer:v2
- name: Install unrar on Ubuntu
run: sudo apt install unrar
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Install unrar on MacOS
run: brew install rar
if: ${{ matrix.os == 'macos-latest' }}
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Run integration tests
run: ./vendor/bin/phpunit --testsuite=Integration
unit:
runs-on: ${{ matrix.os }}
needs:
- php-cs-fixer
strategy:
matrix:
php: [8.1, 8.2, 8.3]
dependencies: [ 'lowest', 'highest' ]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Validate composer.json
run: composer validate
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--no-progress --no-suggest"
- name: Run unit tests
run: ./vendor/bin/phpunit --testsuite=Unit
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=clover.xml -v
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.php == '8.1' && matrix.dependencies == 'highest' }}