-
Notifications
You must be signed in to change notification settings - Fork 23
43 lines (35 loc) · 1.01 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
name: CI
on: [push, pull_request ]
jobs:
verify:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
ports: ["5432:5432"]
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: sessionizer_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v4
- name: Install Linux libraries
run: sudo apt-get install -y libpq-dev
- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
bundler-cache: true
- name: Show Ruby version
run: ruby -v
- name: Prepare database and run tests
env:
CI: github
RAILS_ENV: test
POSTGRES_DB: sessionizer_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
run: |
bundle exec rake db:create db:migrate db:test:prepare
bundle exec rails spec