Skip to content

Centralize tilde path expansion across all platforms and config sections #376

Centralize tilde path expansion across all platforms and config sections

Centralize tilde path expansion across all platforms and config sections #376

Workflow file for this run

name: Lint and Validate
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
security-events: write
jobs:
pre-commit:
name: Run Pre-Commit Checks
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install pre-commit
run: pip install pre-commit
- name: Install uv for Mypy and Pyright
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --group dev
- name: Set up Node.js for markdownlint
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install markdownlint-cli2
run: npm install -g markdownlint-cli2
- name: Run pre-commit hooks (except PSScriptAnalyzer)
run: |
# Skip PSScriptAnalyzer as it requires Windows
SKIP=psscriptanalyzer pre-commit run --all-files --show-diff-on-failure
powershell:
name: PowerShell Script Analysis
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@v1.1
with:
path: ./scripts/windows
recurse: true
output: results.sarif
ignorePattern: '\.git|\.github'
- name: Upload PSScriptAnalyzer results
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: results.sarif
security:
name: Security Scan
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run Trivy security scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy results to GitHub Security
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'