diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ae92a7..010e1c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,38 @@ name: Build & Test on: push: branches: [ main ] + paths-ignore: + - '**.md' + - 'docs/**' + - 'assets/**' + - 'schemas/**' + - '.github/ISSUE_TEMPLATE/**' + - '.idea/**' + - '.claude/**' + - '.gitignore' + - '.commitlintrc.yml' + - 'package.json' + - 'package-lock.json' + - 'LICENSE' + - 'install.sh' + - 'install.ps1' pull_request: branches: [ main ] + paths-ignore: + - '**.md' + - 'docs/**' + - 'assets/**' + - 'schemas/**' + - '.github/ISSUE_TEMPLATE/**' + - '.idea/**' + - '.claude/**' + - '.gitignore' + - '.commitlintrc.yml' + - 'package.json' + - 'package-lock.json' + - 'LICENSE' + - 'install.sh' + - 'install.ps1' permissions: contents: read diff --git a/.github/workflows/script-lint.yml b/.github/workflows/script-lint.yml new file mode 100644 index 0000000..cfceb80 --- /dev/null +++ b/.github/workflows/script-lint.yml @@ -0,0 +1,48 @@ +name: Lint Install Scripts + +on: + push: + branches: [ main ] + paths: + - 'install.sh' + - 'install.ps1' + pull_request: + branches: [ main ] + paths: + - 'install.sh' + - 'install.ps1' + +permissions: + contents: read + +jobs: + shellcheck: + name: Lint install.sh + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + with: + scandir: '.' + additional_files: 'install.sh' + + psscriptanalyzer: + name: Lint install.ps1 + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run PSScriptAnalyzer + shell: pwsh + run: | + Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser + $results = Invoke-ScriptAnalyzer -Path ./install.ps1 -Severity Error,Warning + if ($results) { + $results | Format-Table -AutoSize + exit 1 + } + Write-Host "✅ No issues found in install.ps1"