Skip to content

build(deps): bump the github-actions group with 8 updates #399

build(deps): bump the github-actions group with 8 updates

build(deps): bump the github-actions group with 8 updates #399

name: Swagger Route Check
on:
pull_request:
branches:
- main
- Development
- Staging
paths:
- 'application/single_app/**/*.py'
- 'scripts/check_swagger_routes.py'
- 'functional_tests/route_tests/**/*.py'
- '.github/instructions/python-lang.instructions.md'
- '.github/instructions/location_of_functional_tests.instructions.md'
- '.github/prompts/route-authentication-audit.prompt.md'
- '.github/prompts/prepare-for-pull-request.prompt.md'
- '.github/workflows/swagger-route-check.yml'
jobs:
swagger-route-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Get changed Python files
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files_yaml: |
route_python:
- 'application/single_app/**/*.py'
- 'scripts/check_swagger_routes.py'
route_policy:
- 'application/single_app/**/*.py'
- 'functional_tests/route_tests/**/*.py'
- '.github/instructions/python-lang.instructions.md'
- '.github/instructions/location_of_functional_tests.instructions.md'
- '.github/prompts/route-authentication-audit.prompt.md'
- '.github/prompts/prepare-for-pull-request.prompt.md'
- '.github/workflows/swagger-route-check.yml'
- name: Run swagger route validation
env:
CHANGED_ROUTE_FILES: ${{ steps.changed-files.outputs.route_python_all_changed_files }}
run: |
if [[ -z "$CHANGED_ROUTE_FILES" ]]; then
echo "No changed application Python files detected."
exit 0
fi
echo "Changed Python files:"
printf '%s\n' "$CHANGED_ROUTE_FILES" | tr ' ' '\n'
python scripts/check_swagger_routes.py $CHANGED_ROUTE_FILES
- name: Run route policy validation
if: steps.changed-files.outputs.route_policy_any_changed == 'true'
run: |
python functional_tests/route_tests/test_route_blueprint_policy_inventory.py
python functional_tests/route_tests/test_route_unauthenticated_policy_contract.py
python functional_tests/route_tests/test_route_policy_test_coverage.py