Skip to content

Commit

Permalink
setup tests to run as part of ci (#36)
Browse files Browse the repository at this point in the history
closes: #9
  • Loading branch information
paulsturgess authored Dec 5, 2023
1 parent 735b952 commit 0604486
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,23 @@ jobs:
run: bundle install
- name: Run linter
run: bin/rubocop

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.7
- 3.0
- 3.1
- 3.2
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bin/rspec
2 changes: 1 addition & 1 deletion lib/apia/open_api/objects/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def generate_child_schemas

all_properties_included = error_definition? || enum_definition? || @endpoint.nil?
@children.each do |child|
next unless @endpoint.nil? || (!enum_definition? && @endpoint.include_field?(@path + [child.name]))
next unless @endpoint.nil? || (!enum_definition? && @endpoint.include_field?(@path + [child]))

if child.respond_to?(:array?) && child.array?
generate_schema_for_child_array(@schema, child, all_properties_included)
Expand Down

0 comments on commit 0604486

Please sign in to comment.