-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 920 Bytes
/
ci.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
name: Continuous integration
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_USER: rails-api
POSTGRES_PASSWORD: rails-api
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: RSpec
env:
DB_HOST: localhost
DB_USER: rails-api
DB_PASSWORD: rails-api
RAILS_ENV: test
run: |
bundle exec rake db:create db:schema:load
bundle exec rspec
- name: Lint with RuboCop
run: bundle exec rubocop --parallel