From 8d1036b85172d6a9480138313388d18f950c52f1 Mon Sep 17 00:00:00 2001 From: Swati Panchal Date: Fri, 31 Jan 2025 12:24:09 +0530 Subject: [PATCH] chore: Add job for ESCU Tests --- .../workflows/reusable-build-test-release.yml | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 0fb16542..f2b6cef7 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -122,6 +122,7 @@ jobs: runs-on: ubuntu-latest outputs: execute-knowledge-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }} + execute-escu-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_escu_labeled }} execute-ui-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }} execute-modinput-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }} execute-ucc-modinput-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_ucc_modinput_functional_labeled }} @@ -156,7 +157,7 @@ jobs: run: | set +e declare -A EXECUTE_LABELED - TESTSET=("execute_knowledge" "execute_ui" "execute_modinput_functional" "execute_ucc_modinput_functional" "execute_scripted_inputs" "execute_requirement_test" "execute_upgrade") + TESTSET=("execute_knowledge" "execute_escu" "execute_ui" "execute_modinput_functional" "execute_ucc_modinput_functional" "execute_scripted_inputs" "execute_requirement_test" "execute_upgrade") for test_type in "${TESTSET[@]}"; do EXECUTE_LABELED["$test_type"]="false" done @@ -373,6 +374,40 @@ jobs: run: | find tests -type d -maxdepth 1 -mindepth 1 | sed 's|^tests/||g' | while read -r TESTSET; do echo "$TESTSET=true" >> "$GITHUB_OUTPUT"; echo "$TESTSET::true"; done + run-escu-tests: + if: ${{ !cancelled() && needs.setup-workflow.outputs.execute-escu-labeled == 'true' }} + needs: + - setup-workflow + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.11" + permissions: + actions: read + deployments: read + contents: read + packages: read + statuses: read + checks: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python Dependencies and ContentCTL + run: | + python -m pip install --upgrade pip + pip install contentctl==5.0.0 + + - name: Run ESCU Tests + run: | + echo "running escu tests" + git clone https://github.com/splunk/security_content.git + cd security_content + contentctl test --verbose --container-settings.no-leave-running mode:selected --mode.files detections/network/tor_traffic.yml + run-unit-tests: name: test-unit-python3-${{ matrix.python-version }} if: ${{ needs.test-inventory.outputs.unit == 'true' }}