Skip to content

RSpec

RSpec #1483

Workflow file for this run

name: RSpec
on:
push:
schedule:
- cron: '0 5 * * *'
jobs:
rspec:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: wbari/[email protected]
with:
mongoDBVersion: '4.2'
- uses: getong/[email protected]
with:
rabbitmq version: '3.8.2-management-alpine'
host port: 5672
rabbitmq user: 'guest'
rabbitmq password: 'guest'
rabbitmq vhost: '/'
- uses: ruby/setup-ruby@v1
- name: Cache Gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-edi_gateway-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-edi_gateway-gems-${{ hashFiles('**/Gemfile.lock') }}
- name: bundle install
run: |
export BUNDLE_GITHUB__COM=x-access-token:${{ secrets.X12_TOKEN }}
bundle config path vendor/bundle
bundle install
- name: run rubocop
run: |
git config diff.renameLimit 800
git fetch --no-tags --depth=1 origin trunk
bundle exec rubocop-git origin/trunk | grep "no offenses detected"
- name: Setup Database
run: |
cp config/database.yml.example config/database.yml
bundle exec rake db:create
bundle exec rake db:schema:load
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
- name: run tests
run: |
bundle exec rspec
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres