feat: implement enhanced default behavior and git hook system (refs #73) #145
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 and Test" | |
| on: | |
| pull_request: | |
| paths: | |
| - "**.yml" | |
| - "**.yaml" | |
| - "**.zsh" | |
| - "goprox" | |
| push: | |
| paths: | |
| - "**.yml" | |
| - "**.yaml" | |
| - "**.zsh" | |
| - "goprox" | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| yaml-lint: | |
| name: "YAML Lint" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: "Install yamllint" | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install yamllint | |
| - name: "Lint YAML files with strict rules" | |
| run: | | |
| echo "Running strict YAML linting..." | |
| yamllint -f parsable -c .yamllint .github/workflows/ | |
| json-lint: | |
| name: "JSON Lint" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: "Install jsonlint" | |
| run: | | |
| npm install -g jsonlint | |
| - name: "Lint all JSON files in repo" | |
| run: | | |
| echo "Running JSON linting..." | |
| find . -name '*.json' -print0 | xargs -0 -r jsonlint -q | |
| shell-test: | |
| name: "Shell Script Tests" | |
| runs-on: "ubuntu-latest" | |
| if: contains(github.event.head_commit.modified, 'goprox') || contains(github.event.head_commit.modified, '.zsh') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: "Setup zsh" | |
| run: | | |
| echo "Using zsh version:" | |
| zsh --version | |
| - name: "Install dependencies" | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y exiftool jq | |
| - name: "Make scripts executable" | |
| run: | | |
| chmod +x scripts/testing/*.zsh | |
| chmod +x goprox | |
| - name: "Run shell script tests" | |
| run: | | |
| echo "🧪 Testing shell scripts..." | |
| zsh ./scripts/testing/run-test-suite.zsh --params | |
| zsh ./scripts/testing/run-test-suite.zsh --config |