-
Notifications
You must be signed in to change notification settings - Fork 154
64 lines (59 loc) · 1.67 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: RUBY CI
on:
push:
branches:
- master
pull_request:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
ruby-version: ['3.0.4']
mongodb-version: ['4.2.14']
include:
- ruby-version: 3.0.4
gemfile: Gemfile3
allow-failure: false
env:
SEARCH_SERVER_ES7: http://localhost:9200
MONGOHQ_URL: mongodb://localhost:27017/cs_comments_service_test
MONGOID_AUTH_MECH: ""
NEW_RELIC_ENABLE: false
RACK_ENV: staging
SINATRA_ENV: staging
API_KEY: password
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
RACK_TIMEOUT_SERVICE_TIMEOUT: 20
services:
elasticsearch:
image: elasticsearch:7.8.0
env:
discovery.type: single-node
bootstrap.memory_lock: true
ES_JAVA_OPTS: -Xms512m -Xmx512m
network.host: 0.0.0.0
cluster.routing.allocation.disk.watermark.low: 150mb
cluster.routing.allocation.disk.watermark.high: 100mb
cluster.routing.allocation.disk.watermark.flood_stage: 50mb
ports:
- 9200:9200
mongodb:
image: mongo:${{ matrix.mongodb-version }}
ports:
- 27017:27017
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run tests
run: bin/rspec -fd
continue-on-error: ${{ matrix.allow-failure }}