Skip to content

Heavyweight type checkers #21182

Heavyweight type checkers

Heavyweight type checkers #21182

Workflow file for this run

# This file is used for testing various CLI commands,
# either for development or users, that may otherwise be
# difficult to test in a programmatic way or require
# significant amounts of setup
name: CLI Command Checks
on:
pull_request:
merge_group:
types: [checks_requested]
push:
branches:
- "main"
- "release-**"
env:
DEFAULT_PYTHON_VERSION: "3.13.11"
jobs:
Check-CLI-Changes:
runs-on: ubuntu-latest
outputs:
has_cli_changes: ${{ steps.filter.outputs.cli }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for CLI-related file changes
uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell
filters: |
cli:
- '**/*.py'
- '**/*requirements.txt'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
- '.github/workflows/cli_checks.yml'
- name: Log changed files
if: steps.filter.outputs.cli == 'true'
run: echo "${{ steps.filter.outputs.cli_files }}"
# Basic smoke test of a local install of the fides Python CLI
Fides-Install:
needs: Check-CLI-Changes
if: needs.Check-CLI-Changes.outputs.has_cli_changes == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Install Nox
run: pip install nox>=2022
- name: Install fides
run: pip install .
- name: Run `fides --version`
run: fides --version
CLI-Checks-Summary:
runs-on: ubuntu-latest
if: always()
needs:
- Fides-Install
steps:
- name: Check job results
run: |
echo "Fides-Install: ${{ needs.Fides-Install.result }}"
# Fail only if jobs failed (not if skipped)
if [ "${{ needs.Fides-Install.result }}" == "failure" ]; then
echo "❌ One or more required jobs failed"
exit 1
fi
# Check for cancelled jobs (treat as failure)
if [ "${{ needs.Fides-Install.result }}" == "cancelled" ]; then
echo "❌ One or more required jobs were cancelled"
exit 1
fi
echo "✅ All required CLI checks passed or were skipped"