-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 2.34 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Galaxy6DLib pytest runner
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
#python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
cd Galaxy6DLib
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-datafiles
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
cd Galaxy6DLib
pytest --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html
# pytest --doctest-modules --junitxml=junit/test-results.xml ---cov=. --cov-report=term-missing:skip-covered tests/ | tee pytest-coverage.txt
# pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
# pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: Galaxy6DLib/coverage.xml
junitxml-path: Galaxy6DLib/junit/test-results.xml
- name: Check the output coverage
run: |
echo "Coverage Percentage - ${{ steps.coverageComment.outputs.coverage }}"
echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}"
echo "Coverage Html - ${{ steps.coverageComment.outputs.coverageHtml }}"
echo "Summary Report - ${{ steps.coverageComment.outputs.summaryReport }}"
echo "Coverage Warnings - ${{ steps.coverageComment.outputs.warnings }}"
echo "Coverage Errors - ${{ steps.coverageComment.outputs.errors }}"
echo "Coverage Failures - ${{ steps.coverageComment.outputs.failures }}"
echo "Coverage Skipped - ${{ steps.coverageComment.outputs.skipped }}"
echo "Coverage Tests - ${{ steps.coverageComment.outputs.tests }}"
echo "Coverage Time - ${{ steps.coverageComment.outputs.time }}"
echo "Not Success Test Info - ${{ steps.coverageComment.outputs.notSuccessTestInfo }}"