Skip to content

Input handler import fixed. #67

Input handler import fixed.

Input handler import fixed. #67

Workflow file for this run

# This is a basic workflow to run automated test-cases on GitHub App Action
name: Running Python Unit Tests for Splunk-App-Action
# Controls when the action will run. Triggers the workflow on push or pull request
on:
push:
branches:
- '*'
- '*/*'
- '**'
workflow_dispatch:
jobs:
python-unit-tests:
name: "Running Python Unit Test Cases"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Linting with Ruff
run: ruff check --ignore=E721,E722,E401 --output-format=github --exclude=tests/test_app_repos --exclude=repodir/tests/test_app_repos .
# continue-on-error: true # to ignore ruff errors
- name: Run Python Unit Tests
env:
SPLUNKBASE_USERNAME_FOR_TEST: ${{ secrets.SPLUNKBASE_USERNAME }}
SPLUNKBASE_PASSWORD_FOR_TEST: ${{ secrets.SPLUNKBASE_PASSWORD }}
run: pytest tests --junitxml=junit/test-results.xml --cov=src --cov-config=tests/.coveragerc --cov-report=xml
- name: Adding GitHub action step summary
uses: VatsalJagani/pytest-cov-action@v1
with:
pytest_results_file: "junit/test-results.xml"
pytest_cov_file: "coverage.xml"
if: ${{ always() }}