Skip to content
Closed
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
33 changes: 9 additions & 24 deletions .github/workflows/agent-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
name: Agent Unittest
on:
pull_request: {}
push:
tags: [ "v/*" ]
on: [ "pull_request" ]
jobs:
test:
name: Run tests & display coverage
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
run: |
cd agent
make test
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
COVERAGE_PATH: agent/
GITHUB_TOKEN: ${{ github.token }}
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
name: python-coverage-comment-action
# If you use a different name, update COMMENT_FILENAME accordingly
path: python-coverage-comment-action.txt
files: |
agent/coverage.xml
21 changes: 0 additions & 21 deletions .github/workflows/agent-coverage.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ venv: ## Sets up a python venv at `./venv`
test: venv ## Test using hatch, prints coverage and outputs a report to coverage.xml
$(VENV)hatch -p skyhook-agent test --cover-quiet
$(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
Empty file added foo
Empty file.
Loading