-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.02 KB
/
continuous_integration.yml
File metadata and controls
40 lines (39 loc) · 1.02 KB
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
name: Continuous Integration
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
env:
POSTGRES_DATABASE: postgres
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup test database
run: bundle exec rails db:prepare
- name: Run code style checks
run: bundle exec rubocop
- name: Run security static analysis
run: bundle exec brakeman
- name: Run tests
run: bundle exec rspec