-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 945 Bytes
/
rails-tests.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
name: Run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rails
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Install dependencies
run: |
gem install bundler
bundle install
- name: Set up database
run: |
bundle exec rake db:create
bundle exec rake db:schema:load
bundle exec rake db:migrate
- name: Run tests
run: |
bundle exec rake assets:precompile
bundle exec rake test