Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: PHPUnit pipeline #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/test/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: phpunit

on:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to move file .github/workflows/test/phpunit.yml to .github/workflows/phpunit.yml

push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
phpunit:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: 8.2

- name: Install PHP extensions
run: sudo apt-get install -y php-phpdbg

- name: Check phpdbg version
run: phpdbg -V

- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run tests via PHPUnit
env:
XDEBUG_MODE: coverage
run: |
vendor/bin/phpunit --coverage-clover=coverage.xml
cat ./coverage.xml

- name: Show coverage.xml
run: cat ./coverage.xml

- name: Upload coverage.xml to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true
env_vars: PHP