Skip to content

Commit

Permalink
Update regex patterns in schema.json and refactor CI workflow (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleander authored Nov 26, 2024
1 parent 731f825 commit 2069d6c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ruby.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruby
name: CI

on:
push:
Expand Down Expand Up @@ -31,3 +31,16 @@ jobs:
run: dip rubocop
- name: Run tests
run: dip rspec
schema-validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 23
- name: Install dependencies
run: npm install -g ajv-cli
- name: Validate all dip.yml files
run: find . -type f -name 'dip.yml' | grep -v '/invalid' | xargs -I {} ajv -s schema.json -d {}
10 changes: 5 additions & 5 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"type": "object",
"description": "Contains subcommands with the same structure as main commands",
"patternProperties": {
"^[\\w\\-\\.\\:\\/\\s]+$": {
"^[\\w\\-.:/\\s]+$": {
"$ref": "#/definitions/interaction_command"
}
},
Expand Down Expand Up @@ -142,7 +142,7 @@
"type": "object",
"description": "Defines the commands and their configurations",
"patternProperties": {
"^[\\w\\-\\.\\:\\/\\s]+$": {
"^[\\w\\-.:/\\s]+$": {
"$ref": "#/definitions/interaction_command"
}
},
Expand Down Expand Up @@ -191,13 +191,13 @@
"description": "Contains infrastructure services configuration",
"additionalProperties": false,
"patternProperties": {
"^[\\w\\-\\.\\:\\/\\s]+$": {
"^[\\w\\-.:/\\s]+$": {
"type": "object",
"additionalProperties": false,
"properties": {
"git": {
"type": "string",
"pattern": "^(git@|git://|https?://)[\\w\\d\\.@:\\-/]+$",
"pattern": "^(git@|git://|https?://)[\\w\\d.@:/\\-]+$",
"description": "Git repository URL for the infrastructure component",
"examples": ["https://github.com/mycompany/redis-config.git"]
},
Expand All @@ -220,5 +220,5 @@
}
}
},
"required": ["version", "interaction"]
"required": ["version"]
}

0 comments on commit 2069d6c

Please sign in to comment.