Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ permissions: read-all
jobs:

validate:
name: QC
name: ${{ matrix.check }}
runs-on: ubuntu-24.04
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
check: [yaml-lint, python-lint, python-format, shell-check]

env:
UV_CACHE_DIR: /tmp/.uv-cache
Expand All @@ -31,31 +35,25 @@ jobs:
with:
python-version: ${{ env.UV_PYTHON }}
enable-cache: true

- name: Restore uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
cache-dependency-glob: "uv.lock"

- name: Install dependencies
run: uv sync
run: uv sync --frozen

- name: YAML Lint
if: matrix.check == 'yaml-lint'
run: uv run yamllint -s .

- name: Python Lint
if: always()
if: matrix.check == 'python-lint'
run: uv run ruff check --respect-gitignore .

- name: Python Format Check
if: always()
if: matrix.check == 'python-format'
run: uv run ruff format --check --diff -s --respect-gitignore .

- name: Shell Check
if: always()
if: matrix.check == 'shell-check'
shell: bash
run: |
mapfile -d '' potential_files < <(
Expand All @@ -71,6 +69,3 @@ jobs:
| xargs -r uv run shellcheck -S warning \
&& echo "All checks passed!"
continue-on-error: true

- name: Minimize uv cache
run: uv cache prune --ci
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

# uv
.venv
uv.lock

# Jetbrains
.idea
Expand Down
Loading