Skip to content

Commit

Permalink
Validate JSON5 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob authored May 1, 2024
1 parent e448d5f commit dde006d
Showing 1 changed file with 52 additions and 3 deletions.
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}"

0 comments on commit dde006d

Please sign in to comment.