Skip to content

Commit

Permalink
combine count
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwutk committed Feb 25, 2024
1 parent d24b287 commit d075a8e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
run: |
pytest --collect-only -qq tests/workflow
pytest --collect-only -q -W ignore::Warning tests/workflow | head -n -2 | wc -l
pytest --collect-only -q -W ignore::Warning tests/workflow | head -n -2 | wc -l &> test-count
env:
AP_PORT: 25440
AP_HOST: localhost
Expand All @@ -93,6 +94,11 @@ jobs:
with:
name: workflow-coverage
path: ./coverage.xml

- uses: actions/upload-artifact@v3
with:
name: workflow-count
path: ./test-count

- name: Commit generated test inputs
if: ${{ env.GENERATE_WORKFLOW_TEST_RESULTS == 'true' }}
Expand Down Expand Up @@ -170,6 +176,7 @@ jobs:
run: |
pytest --collect-only -qq tests/video_processor
pytest --collect-only -q -W ignore::Warning tests/video_processor | head -n -2 | wc -l
pytest --collect-only -q -W ignore::Warning tests/video_processor | head -n -2 | wc -l &> test-count
env:
AP_PORT: 25440
AP_HOST: localhost
Expand All @@ -185,6 +192,11 @@ jobs:
with:
name: video-processor-coverage
path: ./coverage.xml

- uses: actions/upload-artifact@v3
with:
name: video-processor-count
path: ./test-count

- name: Commit formatted changes
if: ${{ env.GENERATE_PROCESSOR_TEST_RESULTS == 'true' }}
Expand Down Expand Up @@ -325,6 +337,7 @@ jobs:
run: |
pytest --collect-only -qq tests/engine tests/interface
pytest --collect-only -q -W ignore::Warning tests/engine tests/interface | head -n -2 | wc -l
pytest --collect-only -q -W ignore::Warning tests/engine tests/interface | head -n -2 | wc -l &> test-count
env:
AP_PORT: 25440
AP_PORT_ROAD_1: 25441
Expand All @@ -351,6 +364,11 @@ jobs:
name: engine-and-interface-coverage
path: ./coverage.xml

- uses: actions/upload-artifact@v3
with:
name: engine-and-interface-count
path: ./test-count

upload-coverage:
name: Upload Coverage
needs: [test-video-processor, test-engine-and-interface, test-workflow]
Expand All @@ -369,6 +387,30 @@ jobs:
with:
verbose: true

- name: Download Count
uses: actions/download-artifact@v3
with:
name: video-processor-count
path: ./video-processor-count

- name: Download Count
uses: actions/download-artifact@v3
with:
name: engine-and-interface-count
path: ./engine-and-interface-count

- name: Download Count
uses: actions/download-artifact@v3
with:
name: workflow-count
path: ./workflow-count

- name: Combine Counts
run: |
cat ./video-processor-count ./engine-and-interface-count ./workflow-count | awk '{s+=$1} END {print s}' &> test-count
cat test-count
echo "Total tests: $(cat test-count)"
# - name: Download Coverage
# uses: actions/download-artifact@v3
# with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ output
.coverage
coverage.xml
.virtual_documents
test-count

*.pickle
samples
Expand Down

0 comments on commit d075a8e

Please sign in to comment.