Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

refactor: Rename project to pact-foundation/composer-downloads-plugin #285

refactor: Rename project to pact-foundation/composer-downloads-plugin

refactor: Rename project to pact-foundation/composer-downloads-plugin #285

Workflow file for this run

name: main
on:
push:
pull_request:
branches: [ main ]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
name: PHP CS FIXER
steps:
- uses: actions/checkout@v3
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
phpunit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [8.0, 8.1, 8.2]
os: [ubuntu-latest, macos-latest, windows-latest]
dependencies: [ 'lowest', 'highest' ]
continue-on-error: ${{ matrix.os == 'windows-latest' && matrix.php == '8.2' }}
name: PHP ${{ matrix.php }} - OS ${{ matrix.os }} - Dependencies ${{ matrix.dependencies }}
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, zip, rar, bz2
coverage: pcov
tools: composer:v2
- name: Install unrar on Ubuntu with PHP 8.1 & 8.2
run: sudo apt install unrar
if: ${{ matrix.os == 'ubuntu-latest' && contains(fromJson('["8.1", "8.2"]'), matrix.php) }}
- name: Install unrar on MacOS with PHP 8.1 & 8.2
run: brew install rar
if: ${{ matrix.os == 'macos-latest' && contains(fromJson('["8.1", "8.2"]'), matrix.php) }}
- name: Validate composer.json
run: composer validate
- uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--no-progress --no-suggest"
- name: Run tests
run: ./vendor/bin/phpunit
- 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' }}