Skip to content

Commit

Permalink
add codecov for hub (#3007)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes authored Feb 27, 2025
1 parent b3e16ea commit 717e03e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
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)



0 comments on commit 717e03e

Please sign in to comment.