Add SHELLCHECK.md - Complete ShellCheck reference #11
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| shellcheck: | |
| name: ShellCheck Linting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run ShellCheck | |
| uses: ludeeus/action-shellcheck@master | |
| with: | |
| scandir: './scripts' | |
| severity: warning | |
| - name: Run ShellCheck on hooks | |
| uses: ludeeus/action-shellcheck@master | |
| with: | |
| scandir: './hooks' | |
| severity: warning | |
| json-validation: | |
| name: JSON Validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install jq | |
| run: sudo apt-get update && sudo apt-get install -y jq | |
| - name: Validate plugin.json | |
| run: jq empty .claude-plugin/plugin.json | |
| - name: Validate marketplace.json | |
| run: jq empty .claude-plugin/marketplace.json | |
| - name: Validate hooks.json | |
| run: jq empty hooks/hooks.json | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y jq | |
| - name: Install Gemini CLI | |
| run: npm install -g @google/gemini-cli | |
| - name: Set up test environment | |
| run: | | |
| mkdir -p /tmp/gemini-search-cache | |
| mkdir -p /tmp/gemini-analytics | |
| - name: Run integration tests | |
| env: | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| run: | | |
| if [ -f tests/run-integration-tests.sh ]; then | |
| bash tests/run-integration-tests.sh | |
| else | |
| echo "Integration tests not yet implemented" | |
| fi | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: | | |
| /tmp/gemini-search.log | |
| /tmp/gemini-search-errors.log | |
| security-scan: | |
| name: Security Scanning | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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 | |
| with: | |
| sarif_file: 'trivy-results.sarif' | |