Skip to content

Commit

Permalink
Use coveralls GitHub action for tests and bump actions
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Jul 11, 2024
1 parent e17e0eb commit b39ca1d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Tests

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand All @@ -20,7 +23,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand All @@ -29,7 +32,7 @@ jobs:
coverage: xdebug

- name: Install dependencies with Composer
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Coding standards
if: matrix.analysis
Expand All @@ -44,8 +47,10 @@ jobs:

- name: Upload coverage results to Coveralls
if: matrix.analysis
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls -n -W
vendor/bin/php-coveralls --coverage_clover=clover.xml -v
uses: coverallsapp/github-action@v2
with:
file: clover.xml
flag-name: php-${{ matrix.php }}
# See: https://github.com/coverallsapp/github-action?tab=readme-ov-file#complete-parallel-job-example
parallel: false # Until now only one job is set for analysis
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b39ca1d

Please sign in to comment.