File tree Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 11name : Agent Unittest
22on :
3- pull_request : {}
4- push :
5- tags : [ "v/*" ]
3+ pull_request :
4+ paths :
5+ - agent/**
66jobs :
77 test :
8- name : Run tests & display coverage
8+ name : Skyhook Agent Unit Tests
99 runs-on : ubuntu-latest
1010 permissions :
11- # Gives the action the necessary permissions for publishing new
12- # comments in pull requests.
11+ contents : read
12+ issues : read
13+ checks : write
1314 pull-requests : write
14- # Gives the action the necessary permissions for pushing data to the
15- # python-coverage-comment-action branch, and for editing existing
16- # comments (to avoid publishing multiple comments in the same PR)
17- contents : write
1815 steps :
1916 - uses : actions/checkout@v4
20- - name : Install everything, run the tests, produce the .coverage file and coverage.xml report
17+ - name : Run unittests
2118 run : |
2219 cd agent
23- make test
20+ make test
21+ - name : Generate Summary
22+ uses : test-summary/action@v2
23+ if : always()
24+ with :
25+ paths : " agent/skyhook-agent/test-results.xml"
26+ output : test-summary.md
27+ - name : Display Summary
28+ if : always()
29+ run : |
30+ cat test-summary.md >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change 88.coverage
99.coverage. *
1010coverage.xml
11+ test-results.xml
1112
1213vendor /lock_file.bak
Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ venv: ## Sets up a python venv at `./venv`
3232# #@ Test
3333.PHONY : test
3434test : venv # # Test using hatch, prints coverage and outputs a report to coverage.xml
35- $(VENV ) hatch -p skyhook-agent test --cover-quiet
35+ $(VENV ) hatch -p skyhook-agent test --cover-quiet --junit-xml=test-results.xml
3636 $(VENV ) coverage report --show-missing --data-file=skyhook-agent/.coverage
37- # # $(VENV)coverage xml --data-file=skyhook-agent/.coverage
37+ $(VENV ) coverage xml --data-file=skyhook-agent/.coverage
3838
3939.PHONY : format
4040format :
You can’t perform that action at this time.
0 commit comments