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
31 changes: 19 additions & 12 deletions .github/workflows/agent-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
name: Agent Unittest
on:
pull_request: {}
push:
tags: [ "v/*" ]
pull_request:
paths:
- agent/**
jobs:
test:
name: Run tests & display coverage
name: Skyhook Agent Unit Tests
runs-on: ubuntu-latest
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
contents: read
issues: read
checks: write
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
steps:
- uses: actions/checkout@v4
- name: Install everything, run the tests, produce the .coverage file and coverage.xml report
- name: Run unittests
run: |
cd agent
make test
make test
- name: Generate Summary
uses: test-summary/action@v2
if: always()
with:
paths: "agent/skyhook-agent/test-results.xml"
output: test-summary.md
- name: Display Summary
if: always()
run: |
cat test-summary.md >> $GITHUB_STEP_SUMMARY
1 change: 1 addition & 0 deletions agent/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ dist
.coverage
.coverage.*
coverage.xml
test-results.xml

vendor/lock_file.bak
4 changes: 2 additions & 2 deletions agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ venv: ## Sets up a python venv at `./venv`
##@ Test
.PHONY: test
test: venv ## Test using hatch, prints coverage and outputs a report to coverage.xml
$(VENV)hatch -p skyhook-agent test --cover-quiet
$(VENV)hatch -p skyhook-agent test --cover-quiet --junit-xml=test-results.xml
$(VENV)coverage report --show-missing --data-file=skyhook-agent/.coverage
## $(VENV)coverage xml --data-file=skyhook-agent/.coverage
$(VENV)coverage xml --data-file=skyhook-agent/.coverage

.PHONY: format
format:
Expand Down