-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.1 KB
/
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
44
45
46
47
48
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11-alpine
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: DB Setup
run: bundle exec bin/rails db:setup
env:
RAILS_ENV: test
- name: RuboCop Linter Action
uses: andrewmcodes/rubocop-linter-action@v3.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RAILS_ENV: test
- name: Run RSpec and Code Coverage
uses: paambaati/codeclimate-action@v2.4.0
env:
CC_TEST_REPORTER_ID: 7b9393ecf6ecb3eaba0a724272a9c613da28399b6134054d72ac6ca817c0e3fc
RAILS_ENV: test
with:
coverageCommand: bundle exec rspec