File tree Expand file tree Collapse file tree 3 files changed +43
-3
lines changed
Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Original file line number Diff line number Diff line change 3030
3131 - name : Run tests
3232 run : bundle exec rspec
33+
34+ json_schema :
35+ name : Validate JSON schema
36+
37+ runs-on : ubuntu-latest
38+
39+ steps :
40+ - name : Checkout code
41+ uses : actions/checkout@v3
42+
43+ # Rush needed for easy installation of check-jsonschema
44+ - name : Install rush
45+ run : curl -Ls http://get.dannyb.co/rush/setup | bash
46+
47+ - name : Connect rush repo
48+ run : rush clone dannyben --shallow --default
49+
50+ - name : Install check-jsonschema
51+ run : rush get check-jsonschema
52+
53+ # libyaml needed for Ruby's YAML library
54+ - name : Install OS dependencies
55+ run : sudo apt-get -y install libyaml-dev
56+
57+ - name : Setup Ruby
58+ uses : ruby/setup-ruby@v1
59+ with :
60+ ruby-version : ' 3.1'
61+ bundler-cache : true
62+
63+ - name : Test schema
64+ run : bundle exec run schema
Original file line number Diff line number Diff line change 88/Gemfile.lock
99/gems
1010/spec /tmp
11+ /debug.runfile
1112/tmp
12- /toc.txt
13- debug.rb
1413out.sh
Original file line number Diff line number Diff line change @@ -3,7 +3,16 @@ require 'completely/version'
33
44title "Completely Developer Toolbelt"
55summary "Runfile tasks for building the Completely gem"
6- version Completely::VERSION
76
87import_gem 'runfile-tasks/gem'
98import_gem 'runfile-tasks/docker', image: 'dannyben/completely', version: Completely::VERSION
9+
10+ help 'Test the completely JSON schema'
11+ action :schema do
12+ file = 'lib/completely/templates/sample.yaml'
13+ command = "check-jsonschema --schemafile schemas/completely.json #{file}"
14+ say "\n$ check-jsonschema bb`#{file}`"
15+ success = system command
16+ exit 1 unless success
17+ end
18+
You can’t perform that action at this time.
0 commit comments