Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate JSON5 #39

Merged
merged 5 commits into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 52 additions & 3 deletions .github/workflows/renovate-config-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@ on:
workflow_call:

jobs:

json5:
strategy:
fail-fast: false
matrix:
include:

- name: "Own Config"
config-file: .github/renovate.json5

- name: "Shared Config (Actual)"
config-file: default.json5

- name: "Group Presets"
config-file: group.json5

- name: "Replacements"
config-file: replacement.json5

name: "${{ matrix.name }} (JSON5)"
timeout-minutes: 2
permissions:
# actions/checkout
contents: read
runs-on: ubuntu-latest
steps:

- name: "Cache NPX."
uses: actions/cache@v4
with:
key: npx-${{ github.workflow }}-${{ github.job }}
path: |
~/.npm/_npx

- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v4

- name: "Run json5 validator on ${{ env.FILE }}."
env:
FILE: ${{ matrix.config-file }}
shell: bash
run: >
npx
--yes
json5
--validate
"${FILE}"


config:
strategy:
fail-fast: false
Expand All @@ -23,7 +72,7 @@ jobs:
#- name: "Group Presets"
# config-file: group.json5

name: "${{ matrix.name }}"
name: "${{ matrix.name }} (Renovate)"
timeout-minutes: 2
permissions:
# actions/checkout
Expand All @@ -41,7 +90,7 @@ jobs:
- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v4

- name: "Run renovate-config-validator on shared config."
- name: "Run renovate-config-validator on ${{ env.FILE }}."
env:
FILE: ${{ matrix.config-file }}
shell: bash
Expand All @@ -52,4 +101,4 @@ jobs:
--
renovate-config-validator
--strict
${FILE}
"${FILE}"