-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1010 Bytes
/
test.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
name: Rails Unit Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
services:
db:
image: postgres:9
ports: ['5432:5432']
env:
POSTGRES_USER: sharecar
POSTGRES_PASSWORD: sharecar
POSTGRES_DATABASE: sharecar-test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install libpg
run: |
sudo apt-get -yqq install libpq-dev
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop
- name: Run test
run: |
bundle exec rake db:setup
bundle exec rake test
- name: Run assets:precompile
run: |
bundle exec rake assets:precompile
- name: Run slim-lint
run: bundle exec slim-lint app/views