Amazon SES (Hackathon Demo) #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: v2 App Unit Test | |
on: [pull_request] | |
jobs: | |
v2-app-unit-test: | |
name: "V2 App Unit Test" | |
runs-on: "ubuntu-latest" | |
env: | |
SUMO_APPS_V2_REPO_PATH: ${{ github.workspace }} | |
TARGET_BRANCH: "origin/${{ github.event.pull_request.base.ref }}" | |
SOURCE_BRANCH: "origin/${{ github.event.pull_request.head.ref }}" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install -U pip wheel setuptools | |
- name: "Install sumoappsuite tool" | |
run: | | |
pip3 install $GITHUB_WORKSPACE/scripts/sumologic_appdevutils*.whl | |
- name: "Install terraform" | |
uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: 1.9.2 | |
- name: "Set TERRAFORM_PATH" | |
run: | | |
echo "TERRAFORM_PATH=$(which terraform)" >> $GITHUB_ENV | |
- name: "Verify TERRAFORM_PATH" | |
run: | | |
echo "Terraform path: ${{ env.TERRAFORM_PATH }}" | |
${{ env.TERRAFORM_PATH }} --version | |
- name: "Generate SCR File" | |
run: | | |
sumoappsuite generate-scr-file-v2-app && cat scr_app_list.yaml | |
- name: "Run Sumo Logic App Tests" | |
run: | | |
sumoappsuite run-all-app-tests-v2 -f scr_app_list.yaml -e test_tfApp_installable,test_is_deployable,test_sumo_query,test_threatintel_query,test_update_v2_app |