Skip to content

Commit

Permalink
Improve readability in .github/workflows/tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shimomo committed Jan 5, 2025
1 parent 287a00c commit 5f79e81
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,38 @@ on:
- main
schedule:
- cron: '0 0 * * *'

jobs:
tests:
name: tests
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4']

steps:
- name: Setup php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Checkout
uses: actions/checkout@v4
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suites
run: |
mkdir --parents build/logs
vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
- name: Upload coverage results
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
- name: Setup php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Checkout
uses: actions/checkout@v4

- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suites
run: |
mkdir --parents build/logs
vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
- name: Upload coverage results
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v

0 comments on commit 5f79e81

Please sign in to comment.