Add running dashboard with Dataview queries #106
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: Lint | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| shellcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Курируемые скрипты репозитория — строгий порог (предупреждения). | |
| - name: Run shellcheck (curated, warning level) | |
| run: > | |
| find . -name '*.sh' | |
| -not -path './linux/1c/*' | |
| -not -path './pgsql/pgpro/*' | |
| -print0 | xargs -0 shellcheck -S warning | |
| # Импортированные рабочие скрипты (1С, Postgres Pro/wal-g) приняты «как есть» | |
| # с боевых серверов — порог ошибок, чтобы не переписывать проверенную логику. | |
| - name: Run shellcheck (imported, error level) | |
| run: > | |
| find ./linux/1c ./pgsql/pgpro -name '*.sh' | |
| -print0 | xargs -0 shellcheck -S error | |
| psscriptanalyzer: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run PSScriptAnalyzer | |
| shell: pwsh | |
| run: | | |
| Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser | |
| $results = Get-ChildItem -Path . -Recurse -Filter *.ps1 | | |
| ForEach-Object { Invoke-ScriptAnalyzer -Path $_.FullName -Severity Error } | |
| if ($results) { | |
| $results | Format-Table -AutoSize | Out-String | Write-Host | |
| exit 1 | |
| } | |
| Write-Host 'PSScriptAnalyzer: no errors found.' |