forked from HaughtCodeworks/cfp-app
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (39 loc) · 1.04 KB
/
main.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
name: Main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6
env:
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/events-api_test
RAILS_ENV: test
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2.1.4
with:
path: vendor/bundle
key: gems-${{ hashFiles('Gemfile.lock') }}
restore-keys: gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle config set frozen 'true'
bundle install --jobs 4 --retry 3
- name: Set Up Database
run: bundle exec rails db:create db:schema:load
- name: Run specs
run: bundle exec rake