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

Commit

Permalink
test for github code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-gao committed Jul 22, 2024
1 parent 9cebc0b commit 4d45862
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: build

on: push

jobs:
set_status_in_progress:
name: set_status_in_progress
Expand All @@ -20,6 +20,36 @@ jobs:
with:
module_build: true
runner: biggy-tide

phpunit_coverage:
name: PHPUnit Tests and Coverage
needs: tide_build
runs-on: biggy-tide
steps:
- name: Change to project directory
run: cd $GITHUB_WORKSPACE

- name: Debug information
run: |
pwd
ls -la
which phpdbg
which php
which phpunit
- name: Check PHP and phpdbg versions
run: |
php --version
phpdbg --version
- name: Run PHPUnit tests with coverage
run: phpdbg -qrr $(which phpunit) $GITHUB_WORKSPACE/dpc-sdp --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
export_config:
name: export_config
secrets: inherit
Expand Down
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
project:
default:
target: 80%
threshold: 5%
patch:
default:
target: 80%

0 comments on commit 4d45862

Please sign in to comment.