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

use json schema and validation for configuration #145

Merged
merged 14 commits into from
Jun 22, 2021
Merged
35 changes: 35 additions & 0 deletions .github/workflows/EnoCore.schema-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI Tests / EnoCore Schema Detect differences
on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Install dependencies
run: dotnet restore
- name: Pack
run: dotnet run -c Release -p EnoCore

- name: Git status
run: git status

- name: Check if there are changes
id: changes
run: |
git status --porcelain && echo 1 || echo 0

- name: Fail if changes detected
uses: actions/github-script@v3
if: steps.changes.outputs.changed == 1
with:
script: |
core.setFailed('The JSON schema differs from the EnoCore package. Run "dotnet run -c Release EnoCore" locally.')
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.cfg
ctf.json
ctf.*.json
!/ctf.schema.json
*.code-workspace
data
obj
Expand Down
Loading