-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 1.9 KB
/
rspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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