Skip to content

Commit

Permalink
Add GitHub Actions workflow to run tests with code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
drjayvee committed Oct 20, 2024
1 parent df8a862 commit 8a3e53a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .github/workflows/php.yml

name: PHPUnit with coverage

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install dependencies
run: composer install
- name: Run tests with coverage
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: coverage.xml

0 comments on commit 8a3e53a

Please sign in to comment.