Bump lycheeverse/lychee-action from 1.5.0 to 2.0.2 in /.github/workflows in the github_actions group across 1 directory #159
This file contains hidden or 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: Code Quality | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - '**.py' | |
| - '**.js' | |
| - '**.ts' | |
| - 'requirements*.txt' | |
| - '.github/workflows/code-quality.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| quality: | |
| name: Code Quality Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black flake8 isort mypy ruff || pip install pylint | |
| # Fallback to basic tools if installation fails | |
| if [ $? -ne 0 ]; then | |
| pip install pylint | |
| fi | |
| - name: Ensure src directory exists | |
| run: | | |
| mkdir -p src tests | |
| touch src/__init__.py tests/__init__.py | |
| - name: Check formatting with Black | |
| if: success() || failure() # Run even if previous step failed | |
| run: | | |
| if command -v black &> /dev/null; then | |
| black --check --diff src tests || echo "Black check failed but continuing..." | |
| else | |
| echo "Black not installed, skipping format check" | |
| fi | |
| continue-on-error: true | |
| - name: Check imports with isort | |
| if: success() || failure() | |
| run: | | |
| if command -v isort &> /dev/null; then | |
| isort --check-only --diff src tests || echo "Import check failed but continuing..." | |
| else | |
| echo "isort not installed, skipping import check" | |
| fi | |
| continue-on-error: true | |
| - name: Basic lint check | |
| if: success() || failure() | |
| run: | | |
| if command -v ruff &> /dev/null; then | |
| ruff check src tests || echo "Ruff check failed but continuing..." | |
| elif command -v pylint &> /dev/null; then | |
| pylint src tests --errors-only || echo "Pylint check failed but continuing..." | |
| else | |
| echo "No linter available, skipping lint check" | |
| fi | |
| continue-on-error: true | |
| - name: Basic type checking | |
| if: success() || failure() | |
| run: | | |
| if command -v mypy &> /dev/null; then | |
| mypy --ignore-missing-imports src || echo "Type check failed but continuing..." | |
| else | |
| echo "mypy not installed, skipping type check" | |
| fi | |
| continue-on-error: true | |
| documentation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install mkdocs mkdocs-material | |
| - name: Build documentation | |
| run: mkdocs build --strict | |
| - name: Check for broken links | |
| uses: lycheeverse/lychee-action@v2.0.2 | |
| with: | |
| args: --no-progress --format detailed |