Merge pull request #369 from jamie/actions

CI via Github Actions
This commit is contained in:
Jamie Macey 2020-10-17 08:20:36 -07:00 committed by GitHub
commit 8d673068af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 3 deletions

59
.github/workflows/ruby.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: Ruby
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [2.6, 2.7]
rails: [5.2.4.4, 6.0.3.4]
env:
RAILS_VERSION: ${{ matrix.rails }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with: { ruby-version: 2.6 }
- uses: actions/cache@v2
id: cache
with:
path: |
rswag-ui/node_modules
vendor/bundle
key: ${{ runner.os }}-ruby_${{ matrix.ruby }}-rails_${{ matrix.rails }}-${{ hashFiles('Gemfile', '**/package-lock.json') }}
- name: Install dependencies
run: |
bundle install
cd rswag-ui && npm install
- name: rswag-api
run: |
cd rswag-api
bundle exec rspec
- name: rswag-specs
if: success() || failure()
run: |
cd rswag-specs
bundle exec rspec
- name: rswag-ui
if: success() || failure()
run: |
cd rswag-ui
bundle exec rspec
- name: test-app
if: success() || failure()
run: |
cd test-app
bundle exec rake db:migrate db:test:prepare
bundle exec rspec

View File

@ -1 +1 @@
2.6.3
2.7.2

View File

@ -1,11 +1,13 @@
{
"name": "rswag-ui",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"swagger-ui-dist": {
"version": "3.28.0",
"from": "swagger-ui-dist@3.28.0",
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.28.0.tgz"
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.28.0.tgz",
"integrity": "sha512-aPkfTzPv9djSiZI1NUkWr5HynCUsH+jaJ0WSx+/t19wq7MMGg9clHm9nGoIpAtqml1G51ofI+I75Ym72pukzFg=="
}
}
}

View File

@ -3,6 +3,7 @@ require 'rails_helper'
RSpec.feature 'swagger-ui', js: true do
scenario 'browsing api-docs' do
skip "Needs work to run on others' machines"
visit '/api-docs'
expect(page).to have_content('GET /blogs Searches blogs', normalize_ws: true)