-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.3 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
name: RSpec
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: 'test'
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.3
bundler-cache: true
- name: Install dependencies
run: |
bundle install
- name: Setup Database
run: |
cp config/database.yml.sample config/database.yml
yarn install --check-files
bundle exec rake db:create
bundle exec rake db:schema:load
env:
DATABASE_HOST: 127.0.0.1
DATABASE_USERNAME: 'postgres'
DATABASE_PASSWORD: 'test'
- name: Run Rubocop
run: bundle exec rubocop
- name: Run Tests
run: bundle exec rspec
env:
DATABASE_HOST: 127.0.0.1
DATABASE_USERNAME: 'postgres'
DATABASE_PASSWORD: 'test'
RAILS_TEST_KEY: ${{ secrets.RAILS_TEST_KEY }}
AES_KEY: ${{ secrets.AES_KEY }}
IV_KEY: ${{ secrets.IV_KEY }}
- name: Run Brakeman
run: bundle exec brakeman