Skip to content

Commit

Permalink
upload junit xml test results
Browse files Browse the repository at this point in the history
No-Issue
  • Loading branch information
jerabekjiri committed Sep 9, 2024
1 parent 87a759d commit 1f9992b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ jobs:
run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v start_container.yaml

- name: run the unit test playbook
run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v run_unit_tests.yaml
run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v run_unit_tests.yaml \
--extra-vars "vars=$vars secrets=$secrets github=$github"

# FIXME: do we really care about these anymore ... ?
#- name: run the functional test playbook
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
galaxy_ng-test-results.xml

# Translations
*.mo
Expand Down
1 change: 1 addition & 0 deletions dev/playbooks/files/run_units.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PYTEST_FLAGS=""
PYTEST_FLAGS="$PYTEST_FLAGS --cov-report term-missing:skip-covered --cov=galaxy_ng"
PYTEST_FLAGS="$PYTEST_FLAGS -v -r sx --color=yes"
PYTEST_FLAGS="$PYTEST_FLAGS -p no:pulpcore"
PYTEST_FLAGS="$PYTEST_FLAGS --junit-xml=galaxy_ng-test-results.xml"

# This command will run all unit tests in galaxy_ng/tests/unit.
# If you need to run a single test, include '-k <substring>' in the PYTEST_FLAGS variable
Expand Down
9 changes: 9 additions & 0 deletions dev/playbooks/run_unit_tests.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@
galaxy_ng.tools.local_run:
command: docker exec pulp /bin/bash -c '/tmp/run_units.sh'

- name: "Upload jUnit XML test results"
ignore_errors: true
shell:
curl -v --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}"
--form "xunit_xml=@galaxy_ng-test-results.xml"
--form "component_name=hub"
--form "git_commit_sha=${{ github.sha }}"
--form "git_repository_url=https://github.com/${{ github.repository }}"
"${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/"

0 comments on commit 1f9992b

Please sign in to comment.