diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..32c4dfc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f0c1e67 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + validate: + name: Validate plugin (json / python / shell) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Validate JSON manifests + run: | + find . -name '*.json' -not -path './.git/*' -print0 \ + | xargs -0 -n1 -I{} sh -c 'python -c "import json,sys; json.load(open(sys.argv[1]))" "$1" && echo "OK $1"' _ {} + + - name: Byte-compile Python scripts + run: python -m compileall -q skills + + - name: Lint Python scripts (ruff, error-level) + run: | + python -m pip install --upgrade pip ruff + ruff check --select E9,F63,F7,F82 skills + + - name: Shellcheck hooks + run: shellcheck hooks/*.sh