diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 38bf666..e2789f3 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -13,6 +13,7 @@ workflows: '.github/workflows/buildifier.yml': - 'actions/checkout@v7.0.1' '.github/workflows/check-jsonschema.yml': + - 'actions/cache@v6.1.0' - 'actions/checkout@v7.0.1' - 'astral-sh/setup-uv@v10.4.2' '.github/workflows/cmake.yml': diff --git a/.github/workflows/check-jsonschema.yml b/.github/workflows/check-jsonschema.yml index 88f04c4..a06c981 100644 --- a/.github/workflows/check-jsonschema.yml +++ b/.github/workflows/check-jsonschema.yml @@ -40,18 +40,26 @@ on: # yamllint disable-line rule:truthy branches: - main paths: + - '**/*.json' + - .github/actionlint.yaml - .github/workflows/*.yaml - .github/workflows/*.yml + - .hadolint.yaml + - .pre-commit-config.yaml + - .yamllint.yaml - compose.yaml - - renovate.json pull_request: branches: - main paths: + - '**/*.json' + - .github/actionlint.yaml - .github/workflows/*.yaml - .github/workflows/*.yml + - .hadolint.yaml + - .pre-commit-config.yaml + - .yamllint.yaml - compose.yaml - - renovate.json schedule: - cron: '20 9 * * *' @@ -91,6 +99,11 @@ jobs: - name: install python run: uv python install shell: bash + - name: cache + uses: actions/cache@v6.1.0 + with: + path: ~/.cache/check_jsonschema + key: ${{ runner.os }}-check-jsonschema-${{ hashFiles('.github/workflows/check-jsonschema.yml') }} # yamllint disable-line rule:line-length - name: check-github-workflows run: | shopt -s nullglob @@ -112,3 +125,34 @@ jobs: - name: check-renovate run: uvx check-jsonschema --builtin-schema vendor.renovate renovate.json shell: bash + - name: check-actionlint + run: | + uvx check-jsonschema \ + --schemafile https://json.schemastore.org/actionlint.json \ + .github/actionlint.yaml + shell: bash + - name: check-hadolint + run: | + uvx check-jsonschema .hadolint.yaml --schemafile \ + https://raw.githubusercontent.com/hadolint/hadolint/master/contrib/hadolint.json + shell: bash + - name: check-pre-commit + run: | + uvx check-jsonschema \ + --schemafile https://json.schemastore.org/pre-commit-config.json \ + .pre-commit-config.yaml + shell: bash + - name: check-yamllint + run: | + uvx check-jsonschema \ + --schemafile https://json.schemastore.org/yamllint.json \ + .yamllint.yaml + shell: bash + - name: check-json + run: | + shopt -s dotglob globstar nullglob + files=(**/*.json) + if ((${#files[@]} > 0)); then + echo '{}' | uvx --with orjson check-jsonschema --schemafile - "${files[@]}" + fi + shell: bash diff --git a/.hadolint.yaml b/.hadolint.yaml index 71ded14..5789afd 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -31,7 +31,8 @@ # # -# yaml-language-server: $schema=https://json.schemastore.org/hadolint.json +# yamllint disable-line rule:line-length +# yaml-language-server: $schema=https://raw.githubusercontent.com/hadolint/hadolint/master/contrib/hadolint.json --- label-schema: org.opencontainers.image.authors: text diff --git a/Brewfile b/Brewfile index 9d91b57..3cdc6b3 100644 --- a/Brewfile +++ b/Brewfile @@ -49,7 +49,6 @@ brew 'git' brew 'graphviz' brew 'hadolint' brew 'include-what-you-use' -brew 'jsonlint' brew 'lizard' brew 'llvm' brew 'markdownlint-cli' diff --git a/Dockerfile b/Dockerfile index 22d247b..47164ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,7 +73,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \ gcovr \ graphviz \ iwyu \ - jsonlint \ lldb \ make \ markdownlint \ diff --git a/compose.yaml b/compose.yaml index d4b7cdb..3d2598f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -31,6 +31,7 @@ # # +# yamllint disable-line rule:line-length # yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json --- services: