Skip to content
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
10 changes: 9 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ jobs:

- name: Run API tests
run: |
task --yes api:test
task --yes api:test:coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
files: ./coverage/unit.xml
flags: unittests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

code-analysis-phpstan:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ phpstan.neon
###> claude-code ###
/.claude/settings.local.json
###< claude-code ###

# Coverage reports (generated in CI, uploaded to Codecov).
/coverage
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log.

## [Unreleased]

- [PR-37](https://github.com/itk-dev/event-database-api/pull/37)
Upload test coverage to Codecov in CI
- [PR-36](https://github.com/itk-dev/event-database-api/pull/36)
Add unit tests pinning the Elasticsearch filters' query DSL and parameter descriptors
- [PR-35](https://github.com/itk-dev/event-database-api/pull/35)
Expand Down
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ tasks:
vars:
COMPOSE_ARGS: exec phpfpm bin/phpunit

api:test:coverage:
desc: Run API tests with a Clover coverage report (coverage/unit.xml)
cmds:
- task: compose
vars:
COMPOSE_ARGS: exec --env XDEBUG_MODE=coverage phpfpm bin/phpunit --coverage-clover=coverage/unit.xml

api:spec:export:
desc: Export API spec
cmds:
Expand Down
Loading