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

add codecov for hub #3007

Merged
merged 2 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
component_management:
individual_components:
- component_id: "contentauthor"
- component_id: contentauthor
paths:
- "sourcecode/apis/contentauthor/**"
- component_id: hub
paths:
- "sourcecode/hub/**"

comment:
layout: "header, diff, flags, components" # show component info in the PR comment
layout: "header, diff, flags, components" # show component info in the PR comment
1 change: 1 addition & 0 deletions .github/workflows/contentauthor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: contentauthor
files: /tmp/coverage.xml
context: sourcecode/apis/contentauthor

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,22 @@ jobs:

- name: Run tests
run: |
docker run --rm --net=host \
docker run --rm -v "/tmp:/reports" --net=host \
-e MEILISEARCH_HOST=http://localhost:7700 \
-e DB_HOST=127.0.0.1 \
-e DB_DATABASE=postgres \
hub-test vendor/bin/phpunit --exclude-testsuite Browser
hub-test vendor/bin/phpunit \
--exclude-testsuite Browser \
--coverage-clover /reports/coverage.xml

# TODO: insert codecov stuff here when repo is opened
- name: Upload coverage to Codecov
if: github.event_name == 'push' && github.ref != 'refs/heads/master'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/coverage.xml
flags: hub
context: sourcecode/hub

- name: Gather Docker metadata for PHP image
id: php_meta
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ Overall coverage [![codecov](https://codecov.io/github/cerpus/Edlib/branch/maste

The code coverage report is currently covering the PHP parts of the Edlib code for the following parts of Edlib:

- The Hub: N/A - pending setup.
- The Hub: [![codecov](https://codecov.io/github/cerpus/Edlib/branch/master/graph/badge.svg?token=E3ZWIO0XR8&flag=hub)](https://codecov.io/github/cerpus/Edlib)

- Content Author: [![codecov](https://codecov.io/github/cerpus/Edlib/branch/master/graph/badge.svg?token=E3ZWIO0XR8)](https://codecov.io/github/cerpus/Edlib)
- Content Author: [![codecov](https://codecov.io/github/cerpus/Edlib/branch/master/graph/badge.svg?token=E3ZWIO0XR8&flag=contentauthor)](https://codecov.io/github/cerpus/Edlib)