Skip to content

Commit

Permalink
feat: requirements unit tests (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
uoboda-splunk authored Dec 23, 2021
1 parent 4ebd30c commit ce0e01b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/reusable-build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ jobs:
name: testsets
run: |
find tests -type d -maxdepth 1 -mindepth 1 | sed 's|^tests/||g' | while read -r TESTSET; do echo "::set-output name=$TESTSET::true"; echo "$TESTSET::true"; done
run-unit-tests:
name: test-unit-python3-${{ matrix.python-version }}
if: ${{ needs.test-inventory.outputs.unit == 'true' }}
Expand Down Expand Up @@ -405,6 +406,30 @@ jobs:
name: test-results-unit-python_${{ matrix.python-version }}
path: test-results/*

run-requirements-unit-tests:
if: ${{ needs.test-inventory.outputs.requirement_test == 'true' }}
runs-on: ubuntu-latest
needs:
- build
- test-inventory
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: run-tests
uses: splunk/[email protected]
with:
input-files: tests/requirement_test/logs
- name: Archive production artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results
path: |
test_*.txt
appinspect:
name: quality-appinspect-${{ matrix.tags }}
needs: build
Expand Down Expand Up @@ -746,6 +771,7 @@ jobs:
name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report
path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml"
reporter: java-junit

run-requirement-tests:
if: ${{ needs.test-inventory.outputs.requirement_test == 'true' }}
needs:
Expand Down Expand Up @@ -900,6 +926,7 @@ jobs:
name: splunk ${{ matrix.splunk }} ${{ env.TEST_TYPE }} test report
path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml"
reporter: java-junit

run-ui-tests:
if: ${{ needs.test-inventory.outputs.ui == 'true' }}
needs:
Expand Down Expand Up @@ -1054,6 +1081,7 @@ jobs:
name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} test report
path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml"
reporter: java-junit

run-modinput-tests:
if: ${{ needs.test-inventory.outputs.modinput_functional == 'true' }}
needs:
Expand Down Expand Up @@ -1224,6 +1252,7 @@ jobs:
- security-virustotal
- test-inventory
- run-unit-tests
- run-requirements-unit-tests
- appinspect
- setup
- run-knowledge-tests
Expand Down

0 comments on commit ce0e01b

Please sign in to comment.