-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (47 loc) · 1.26 KB
/
build.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
44
45
46
47
48
49
50
51
52
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15.2
env:
POSTGRES_PASSWORD: password
mongo:
image: mongo:4.4.1
redis:
image: redis:7.0
options: --entrypoint redis-server
container:
image: ruby:3.2.2
env:
BASE_URL: 'http://example.com'
DATABASE_URL: postgresql://postgres:password@postgres
MONGO_HOST: mongo
RAILS_ENV: test
REDIS_URL: redis://redis:6379
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install dependencies
run: |
gem install bundler
bundle config set without 'development production'
bundle config set path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Setup
run: |
bin/rails db:create db:migrate
- name: Run specs
run: |
bundle exec rake